this post was submitted on 05 Apr 2025
162 points (96.0% liked)

Programmer Humor

35510 readers
3 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] mdhughes@lemmy.sdf.org -1 points 1 month ago (1 children)

If you write to a text (as opposed to binary) stream, \n produces \n or \r\n (or \r if old enough) depending on platform just fine.

Nobody should be using C++ anyway, but plenty of languages have silly system newline constants, which do nothing useful.

[–] MrScottyTay@sh.itjust.works 4 points 1 month ago (1 children)

Why should no one be using c++?