Hi all,
I have a vector of pointers to objects called GamePiece
I'm using an iterator to go through them like this...
The code above compiles without error, but if I replaceCode:vector<GamePiece*> v = p1->getPieces(); for (vector<GamePiece*>::const_iterator ci = v.begin(); ci != v.end(); ++ci){ GamePiece *p = *ci; p->getType(); }
withCode:GamePiece *p = *ci; p->getType();
I get errors about not being able to convert one type to another. What would I have to do to dereference ci in one line?Code:**ci.getType()