Create a gist now

Instantly share code, notes, and snippets.

@thiagomg /loop1.cpp
Last active Oct 13, 2015

Embed
Range loops - Writing safe
//Bad code. Don't try it at home.
int count = 1;
while (count < msgs.size() - 1)
{
const Message &item = msgs[count];
PublishMessage(item);
count++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment