已采纳回答 / 罗毅豪
#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
最赞回答 / fy491423
int getMaxOrMin(int *arr, int count, bool isMax){ int temp = arr[0]; for (int i = 1; i < count; i++) { if (isMax) { if (temp < arr[i]) { temp = arr[i]; } } else { if (temp > arr[i]) { temp = arr[i]; } } }return temp;}获取最大值...
2016-04-07