1// vector::push_back
2#include <iostream>
3#include <vector>
4
5int main ()
6{
7 std::vector<int> myvector;
8 int myint = 2;
9
10 std::cout << "Please enter some integers (enter 0 to end):\n";
11
12 do {
13 std::cin >> myint;
14 myvector.push_back (myint);
15 } while (myint);
16
17 std::cout << "myvector stores " << int(myvector.size()) << " numbers.\n";
18
19 return 0;
20}