// Project hello1.cpp // (Old fashioned style) // See how to read strings using the char[] // style. The function strcmp(s1, s2) returns // 0 when the strings s1 and s2 passed in to // it are equal. Terminate reading with "quit". // strcmp is declared in string.h. #include #include #include int main() { char name[50]; cout << "Enter a name: "; while(cin >> name, strcmp(name, "quit") != 0) { cout << "Hello, " << name << "." << endl; cout << "Enter another name: "; } return 0; }