Created
September 28, 2011 21:41
-
-
Save apbarrero/1249333 to your computer and use it in GitHub Desktop.
While style looping
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| std::vector<CClass> MyVector; | |
| std::vector<CClass>::const_iterator itElement = MyVector.begin(); | |
| while (itElement != MyVector.end()) { | |
| const CClass& Object = (*itElement++); | |
| // Do whatever you have to do with Object | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment