+ 1
I want to show "\n" in my program
How I can do it?
2 Respostas
+ 4
Escape the backslash with another backslash: "\\n"
+ 2
You can always use Raw string literals
auto greeting = R"("Hello \n world")";
https://docs.microsoft.com/en-us/cpp/cpp/string-and-character-literals-cpp?view=vs-2017