getline不能连续读入

string str1,str2;
getline(cin,str1);
getline(cin,str1);

第二行不能读入

只能使用cin>>str1>>str2

你可能感兴趣的:(.net/C++/c#)