#include <iostream>
usingnamespace std;
int main()
{
string name;
cout << "Please type your name: ";
// cout >> name; // your code...
// correct code is to use cin...
cin >> name; // new code..
cout << "Your name is " << name << endl;
system("PAUSE");
return 0;
}
#include <iostream>
usingnamespace std;
int main()
{
string name;
cout << "Please type your name: ";
cin >> name; //this line is different from your code
cout << "Your name is " << name << endl;
system("PAUSE");
return 0;
}