When printing output to a terminal in C++, should i use "\n", or "endl"??? Is one lighter, faster, or industry standard?
athlon32 56
Junior Poster in Training
Recommended Answers
Jump to PostI use a mixture of both, if you stick a "\n" in a file it will put the next bit of data on a newline. I think endl is just for console output. its probably good to get used to using "\n" as there are other escape sequences too, like …
All 4 Replies
lexusdominus 1
Junior Poster in Training
Narue 5,707
Bad Cop Team Colleague
thelamb 163
Posting Pro in Training
athlon32
commented:
It was a great post...a lot of help :D +1
athlon32 56
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.