// example of using STL vector class: // define a vector of string objects, put some strings into it // (from standard input), and print them out. #include #include #include #include // has EXIT_SUCCESS int main(void) { vector v; string tempS; cout << "Enter some words, control-D to end:\n"; while (cin >> tempS) { v.push_back(tempS); } cout << "\nYou entered:\n"; for (unsigned int i=0; i < v.size(); i++) { cout << v[i] << endl; } return EXIT_SUCCESS; }