Hi, could anyone explain me why the two line are ok?
std::vector<Side>* _sides;
std::vector<Side>::iterator its;
int temp;
for (its = _sides->begin(); its != _sides->end(); ++its)
temp += (*its).getSide(); //1
temp += its->getSide(); //2
std::vector<Side>* _sides;
std::vector<Side>::iterator its;
int temp;
for (its = _sides->begin(); its != _sides->end(); ++its)
temp += (*its).getSide(); //1
temp += its->getSide(); //2
To copy to clipboard, switch view to plain text mode
Could explain me what scenario we have in term of pointers (refering to its. eg: in the loop its pointer to.........)
Thank you.
Bookmarks