// Demonstrating STL vector copying constructors #include #include #include using namespace std; int main() { cout << "Demonstrating STL vector copying constructors" << endl; char name[] = "George Foreman"; vector George(name, name + 6); vector anotherGeorge(George.begin(), George.end()); assert (anotherGeorge == George); vector son1(George); // Uses copy constructor assert (son1 == anotherGeorge); vector son2 = George; // Also uses copy constructor assert (son2 == anotherGeorge); return 0; }