+ 2

What is wrong?

in c++ I wanted to print "hello, @how are you?". I did #include <iostream> using namespace std; int main ( ) { cout << hello, how are you? << endl; return 0; } but it says: line 5: 'hello' was not included in cout << hello, how are you? << endl; line 5: 'how' was not included in cout << hello, how are you? << endl; line 5: 'are' was not included in cout << hello, how are you? << endl; line 5: 'you' was not included in cout << hello, how are you? << endl; what can I do?

18th Dec 2016, 7:32 AM
Edwin Pratt
Edwin Pratt - avatar
4 Réponses
+ 2
add double quote " " to make it a valid string.
18th Dec 2016, 7:35 AM
Shekhar Bahuguna
Shekhar Bahuguna - avatar
+ 1
hey Edwin , #include <iostream> using namespace std; int main ( ) { cout << "hello, how are you?" << endl; return 0; } Used quotation in cout .. " Hello , How are you ?" -- we should treat it as string .. Hope now its work fine ...
18th Dec 2016, 7:40 AM
Mock
Mock - avatar
+ 1
"" are used to make valid string..
28th Dec 2016, 1:56 PM
chandni singh
chandni singh - avatar
0
Only add double quote in "Hello, how are you?"
18th Dec 2016, 8:30 AM
Eliecer Cedano
Eliecer Cedano - avatar