hallo alle,
i need to know whats the fastest way to iterate through vector
this:
or this:Code:for( vector<MyObj*>::iterator it = vMyVector.begin(); it != vMyVector.end(); it++ ) { MyObj * ptr = *it; //do something }
greetings,Code:for( int i = 0; i < vMyVector.size(); i++ ) { MyObj * ptr = vMyVector[i]; //do something }




Reply With Quote