See www.bruceeckel.com (Thinking In C++) for more info on stringsCode:#include <iostream> #include <string> using namespace std; int main() { cout << "What is your name? " << flush; string nm; getline(cin, nm); cout << endl << "Hello " << nm << "!" << endl; return 0; }![]()




Reply With Quote