C++获取一行string

#include<string>
using namespace std;
	string line ;
	while(getline(cin,line)){
		cout<<line<<endl;
	}
	cout<<"getline fail  exit"<<endl;

猜你喜欢

转载自blog.csdn.net/jzlStudent/article/details/103690057