0
\n
Hello. I have a question about using "\n". When i want put "\n" in code: cout <<a<<\n;- displays error
3 ответов
+ 3
It's a character, put double-quotes around it. Or use endl instead.
cout <<a<<"\n";
cout <<a<<endl;
cout <<"This will be printed\non two different lines";
0
Thanks
0
Beside Zen Zesaid, you can "wrap" \n inside a couple of single-quote if its valued like single char