新手求教,关于cin的问题
程序代码:
#include<iostream> #include<string> using namespace std; int main() { const int arsize = 20; string name; string dessert; cout << "enter ur name:\n"; cin.getline(name, arsize); cout << "enter ur favorite dessert:\n"; cin.getline(dessert, arsize); cout << "i have some delicious " << dessert; cout << " for you, " << name << ".\n"; return 0; }
[此贴子已经被作者于2017-2-27 10:50编辑过]