dereferencing pointers to pointers
Hi all,
I have a vector of pointers to objects called GamePiece
I'm using an iterator to go through them like this...
Code:
vector<GamePiece*> v = p1->getPieces();
for (vector<GamePiece*>::const_iterator ci = v.begin(); ci != v.end(); ++ci){
GamePiece *p = *ci;
p->getType();
}
The code above compiles without error, but if I replace
Code:
GamePiece *p = *ci;
p->getType();
with
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?