#include < iostream>
#include < vector>
using namespace std;
// push_back(), add an item to the end of the container
int main() {
vector < int > v;
v.push_back(1);
v.push_back(2);
v.push_back(3);
v.push_back(4);
for (int i=0;i<4;i++)
cout << v[i] << " ";
}
No comments:
Post a Comment