It's good practice to take notice of what's placed as the "test" for a loop like that. The same can be said of testing a container's length() function each time (though the actual overhead might be...