+ 1

Where did I go wrong

#include <iostream> using namespace std; int main() { string text; cout << " Hello what is your name? \n" ; getline(cin,text); // input block cin cout << "nice to meet you " << text; cout << “I am place holder name”; return 0; }

3rd Jul 2020, 1:03 AM
sniper x
sniper x - avatar
2 Respostas
+ 7
Try now in your third cout you use single quotes two times so it giving errors put double quotes . #include <iostream> using namespace std; int main() { string text; cout << " Hello what is your name? \n" ; getline(cin,text); // input block cin cout << "nice to meet you " << text; cout << "I am place holder name"; return 0; }
4th Jul 2020, 5:11 AM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 4
You have invalid characters in your code. This usually came from copying & pasting text in web browser. Open and view the code in a web browser, you will notice them.
3rd Jul 2020, 1:19 AM
Ipang