已采纳回答 / 罗毅豪
#include<iostream>#include<stdlib.h>#include<string>using namespace std;int main(){string name;cout << "please input your name:" << name;getline(cin, name);if (name.empty()){cout << "input is null..." << endl;retu...
2016-04-10
已采纳回答 / 慕UI5843414
格式:getline(输入流即cin,string对象定义的变量)使用:getline(cin,string stu)从输入流中读入一行到变量stu中。输入空格即输入结束。
2016-04-10
已采纳回答 / 无柳先生V
改成:cout << stu.getName() << " " << stu.getGender() << " " << stu.getScore() << endl;
2016-03-28