Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::vector<std::string> stuff;
- stuff.push_back("This is not awesome.");
- stuff.push_back("Totally not.");
- for(std::vector<std::string>::iterator it = stuff.begin(); it != stuff.end(); it++)
- print(stuff[i]);
- // Two variants for C++0x:
- std::vector<std::string> stuff = {
- "This is awesome.",
- "Totally."
- }
- for(std::string& v : stuff) // sadly not implemented yet in most compilers
- print(v)
- for(auto it = stuff.begin(); it != stuff.end(); it++)
- print(v)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement