+ 2
How do you print "\n"?
If I wanted to print "\n" as it is so that it displays those characters, instead of ending my line there, how do I include it within the quotation marks when the compiler doesn't identify it as a part of my string?
3 Respuestas
+ 3
"\\n"
+ 5
Just use "\\n" instead of "\n".
Another '\' in front of \ means that it isn't a special character representation because "\\" = string('\').
You can use it with every '\'.
0
R"(\n)"