Skip to content

Instantly share code, notes, and snippets.

@chanwit
Created August 15, 2011 15:23
Show Gist options
  • Select an option

  • Save chanwit/1146987 to your computer and use it in GitHub Desktop.

Select an option

Save chanwit/1146987 to your computer and use it in GitHub Desktop.
C++0x noob
#include <iostream>
#include <vector>
#include <string>
using namespace std;
//
// $ g++ --std=c++0x test.cpp
//
int main() {
vector<string> list;
list.push_back("a");
list.push_back("b");
list.push_back("c");
for(auto i = list.begin(); i != list.end(); i++) {
cout << *i << endl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment