Basic String input
问题 I've just came across this bit of code that allows users to input strings in the command prompt. I'm aware of what they do and it's all great. But I have a question in regards to the cin and getline() functions. string name ; cout << "Please enter your full name: " ; cin >> name ; cout << "Welcome " << name << endl ; cout << "Please enter your full name again please: " ; getline(cin , name) ; cout << "That's better, thanks " << name << endl ; return 0 ; Now when this is output, I get