c++如何读入一行数据换行再继续读入

2025-03-09 09:02:46
推荐回答(1个)
回答1:

你好!
string str;
getline(cin,str); //这是读你的那一行数据
stringstream s(str);
注意增加相应的头文件