0
Whats wrong with this program???
#include<iostream> #include<string> using namespace std; int main(){ string name; cout << "Enter your name:\n"; cin >> name; getline (cin, name); cout<<name; return 0; }
1 Antwort
+ 1
Leave out the line
cin >> name;
after that the code will work fine!