/* testarr10.cpp CIS 150 06/19/2008 David Klick This program shows how an array of strings can be declared and used. */ #include using std::cin; using std::cout; void cont(); int main() { int i; const int ARRAY_SIZE = 4; // declare and initialize array of names // each name is also an array of characters // a maximum length for each name must be specified // - 15 in this case (14 chars + terminating null) char names[][15] = { "Bob", "Carol", "Ted", "Alice" }; // display names for (i=0; isungetc() != -1 && cin.get() != '\n') cin.ignore(80,'\n'); cout << "Press enter to continue..."; cin.get(); } /* Sample output: Bob Carol Ted Alice */