so...how do you write out \n?

seems like to obvious of a thing to be a flaw in the language so i was just wondering how would someone print out "\n" in their program?
the only way i can think of is assigning it to something else that equals that...but im not sure
Last edited on
Escape the '\' like so:

std::cout<<"\\n"; //this will print out \n
Topic archived. No new replies allowed.