Skip to content

Instantly share code, notes, and snippets.

@apbarrero
Created September 28, 2011 21:41
Show Gist options
  • Select an option

  • Save apbarrero/1249333 to your computer and use it in GitHub Desktop.

Select an option

Save apbarrero/1249333 to your computer and use it in GitHub Desktop.
While style looping
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