Created
October 12, 2016 23:22
-
-
Save marcoscastro/942be8f688ba4d6cf09a02b427d98388 to your computer and use it in GitHub Desktop.
C++ - STL - vector
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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