第一个cin.get 就可以试用 但是换成 cin.getline 就会报错 .
这个是为什么ya
using namespace sstd;
cout << "what year was your house built?\n";
int year;
cin >> year;
cin.get();
cout << "what is its street address?\n";
char address[99999];
cin.getline(address, 99999);
cout << "Year built :" << year << endl;
cout << "Address :" << address << endl;
cout << "Done!";