Sorry if the title doesn't make sense. I don't know how to word it as I'm fairly new to C++. Basically I have this:
sf::VertexArray *vArray;
If I want to access the position inside, I would have to do this:
(*vArray)[0].position = ...;
Is there a way to use the arrow notation instead? Why can't I do this: vArray[0]->position = ...;?
Any help would be appreciated!
EDIT: sf::VertexArray is part of the SFML library: https://github.com/SFML/SFML/blob/master/src/SFML/Graphics/VertexArray.cpp
vArrayhas typesf::VertexArray *,vArray[0]is just built-in pointer arithmetic, and has typesf::VertexArray. That type has nooperator->, and so you cannot do->positionon it. Even if it did havesf::Vertex *operator->(), presumably it would be implemented to return a pointer to the first vertex in the VertexArray, so would only have quite limited use. I expect that's why it's not provided.