请问为啥我要敲两次回车?没法解决,求助
int main(){
string name;
cout << "please enter yourname:";
getline(cin, name);
if (name.empty())
{
cout << "your name is null" <<endl;
system("pause");
return 0;
}
if (name == "imooc")
cout << "you are a adminisriter" << endl;
cout << "hello" + name << endl;
cout << "the first letter of your name is:" << name[0] << endl;
cout << "the length of your name :" << name.size() << endl;
system("pause");
return 0;
}