cin>>n;
cin.ignore(1,EOF);//cin.ignore()
getline(cin,temp,’\n’);//getline(cin,temp);
https://blog.csdn.net/wxbmelisky/article/details/48596881
std::cin与getline混用 cin.ignore()
最新推荐文章于 2024-05-11 22:20:23 发布
cin>>n;
cin.ignore(1,EOF);//cin.ignore()
getline(cin,temp,’\n’);//getline(cin,temp);
https://blog.csdn.net/wxbmelisky/article/details/48596881