Skip to content

Instantly share code, notes, and snippets.

@oza
Created December 12, 2009 02:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oza/254676 to your computer and use it in GitHub Desktop.
Save oza/254676 to your computer and use it in GitHub Desktop.
all:
g++ a.cpp -o a
./a
clean:
rm -rf a
#include <iostream>
#include <string>
#include <vector>
int main()
{
std::vector<int> v;
std::vector<int>::iterator it;
v.push_back(1);
v.push_back(2);
v.push_back(3);
for( it = v.begin(); it != v.end(); it++){
std::cout << *it << std::endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment