cm0002@lemmy.world to Programmer Humor@programming.dev · 2 days agoDoes this exist anywhere outside of C++?lemmy.mlimagemessage-square54fedilinkarrow-up1158arrow-down120cross-posted to: programmerhumor@lemmy.ml
arrow-up1138arrow-down1imageDoes this exist anywhere outside of C++?lemmy.mlcm0002@lemmy.world to Programmer Humor@programming.dev · 2 days agomessage-square54fedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squareembed_me@programming.devlinkfedilinkarrow-up5·1 day agoI only program in C. I was under the assumption that \n also flushes
minus-squarepelya@lemmy.worldlinkfedilinkarrow-up3·edit-223 hours 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-squareulterno@programming.devlinkfedilinkEnglisharrow-up2·1 day 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.