+ 1

a=5; cout<<a\n;

Can this statment be used

18th Jun 2017, 12:20 PM
akshay Kumar
akshay Kumar - avatar
4 Antworten
+ 1
No. a is an int variable and cannot be combined in this way with a string literal. Use cout<<a<<"\n";
18th Jun 2017, 12:28 PM
Louis
Louis - avatar
+ 1
Thnks
18th Jun 2017, 12:37 PM
akshay Kumar
akshay Kumar - avatar
+ 1
or you could use cout << a << endl;
18th Jun 2017, 1:11 PM
Sonu Kumar Singh
Sonu Kumar Singh - avatar
0
Yaa
18th Jun 2017, 1:21 PM
akshay Kumar
akshay Kumar - avatar