cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
so...how do you write out \n?
so...how do you write out \n?
Mar 21, 2010 at 5:25am UTC
vlad61
(212)
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
Mar 21, 2010 at 5:26am UTC
Mar 21, 2010 at 5:38am UTC
firedraco
(6243)
Escape the '\' like so:
std::cout<<
"\\n"
;
//this will print out \n
Topic archived. No new replies allowed.