#include <iostream> #include <set> #include <vector> using namespace std; int main() { vector <int> a; a.push_back(1); a.push_back(1); a.push_back(1); a.push_back(5); a.push_back(1); a.push_back(1); vector <int> ::iterator iterator ; for(iterator=a.begin();iterator!=a.end();iterator++){ cout<<*iterator<<endl; } cout<<endl; cout<<a[3]; return 0; } |
|