cm0002@lemmy.world to Programmer Humor · 11 days agoDoes this exist anywhere outside of C++?lemmy.mlexternal-linkmessage-square59linkfedilinkarrow-up1167arrow-down123cross-posted to: [email protected]
arrow-up1144arrow-down1external-linkDoes this exist anywhere outside of C++?lemmy.mlcm0002@lemmy.world to Programmer Humor · 11 days agomessage-square59linkfedilinkcross-posted to: [email protected]
minus-squareembed_melinkfedilinkarrow-up5·11 days agoI only program in C. I was under the assumption that \n also flushes
minus-squarepelya@lemmy.worldlinkfedilinkarrow-up3·edit-210 days agoIt depends on whether you are printing to a terminal or to a file (and yes the terminal is also a file), and even then you can control the flushing behaviour using something like unbuffer
minus-squareulternolinkfedilinkEnglisharrow-up2·10 days agoI remember having to fflush a couple of times.
I only program in C. I was under the assumption that \n also flushes
It depends on whether you are printing to a terminal or to a file (and yes the terminal is also a file), and even then you can control the flushing behaviour using something like
unbuffer
I remember having to
fflush
a couple of times.