b***y 发帖数: 2799 | 1 ☆─────────────────────────────────────☆
careerchange (Stupid) 于 (Mon Dec 8 20:34:06 2008) 提到:
Urgent help needed, project due in a couplr of hours.
What is wrong? The following code does not ask the name input:
At running, after I type 3, it prints but does not wait for input.
#include
#include
using namespace std;
int main(){
int nextAction;
cin >> nextAction;
char name[80];
cout << "Please type the name:" << endl;
cin.getline(itemname,80,'\n');
|
|