#include <iostream>
#include <string>
using namespace std;
int main ()
{
string mystr;
cout << "What's your name? ";
getline (cin, mystr);
cout << "Hello " << mystr << ".\n";
return 0;
}
i want to have this output
What's your name? john long
Hello john long
but still unlucky to have that output
This post has been edited by jimblumberg: 19 November 2012 - 01:27 PM
Reason for edit:: Added missing Code Tags, Please learn to use them.

New Topic/Question
Reply



MultiQuote



|