我已经做了这个程序,它得到用户的地址,名称和工作。然后,它将所有内容放入一个字符串中并输出该字符串。str[600];char name[10];cout<<"Enter your name and press ENTER: ";cout<<"\nEnter your adress and press ENTER:";c
一切都编译得很好,但是当程序运行时,它只是跳过从用户获取输入。因此,它将输出:"Enter string to be inserted:“,然后跳过cin.getline函数,然后执行下一个命令。cout << "Enter string to be inserted: " << endl;
cin.getline(tempCString, 500, '\n'); //I've also tried