Skip to content

Instantly share code, notes, and snippets.

@marcoscastro
Created October 12, 2016 23:22
Show Gist options
  • Save marcoscastro/942be8f688ba4d6cf09a02b427d98388 to your computer and use it in GitHub Desktop.
Save marcoscastro/942be8f688ba4d6cf09a02b427d98388 to your computer and use it in GitHub Desktop.
C++ - STL - vector
// STL - Standard Template Library
#include <vector>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
vector<int> vet;
vet.push_back(10);
vet.push_back(20);
vet.push_back(30);
for(unsigned int i = 0; i < vet.size(); i++)
{
cout << vet[i] << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment