#include #include /* * * 3.16 * * */ using std::string; using std::cout; using std::cin; using std::cerr; using std::clog; using std::endl; using std::vector; int main () { vector v1; // 0 elements? vector v2(10); // 10 elements, default initialized vector v3(10, 42); // 10 elements, all initialized to 42 vector v4{10}; // 1 element, initialized to 10. vector v5{10, 42}; // 2 elements, first one 10, second one 42 vector v6{10}; // Not really valid but it creates 10 elements of default initialized strings. Empty strings. vector v7{10, "hi"}; // Not really valid but creates 10 elements that says "hi" cout << v1.size() << " v8(10); // same as v6? //vector v9(10, "hi"); // Same as v7? //cout << v7[1] << endl; //cout << v9[1] << endl; return 0; }