cm0002@lemmy.world to Programmer Humor@programming.dev · 3 months agoDoes this exist anywhere outside of C++?imagemessage-square9fedilinkarrow-up180
arrow-up180imageDoes this exist anywhere outside of C++?cm0002@lemmy.world to Programmer Humor@programming.dev · 3 months agomessage-square9fedilink
minus-squareembed_me@programming.devlinkfedilinkarrow-up3·3 months agoI only program in C. I was under the assumption that \n also flushes
minus-squarepelya@lemmy.worldlinkfedilinkarrow-up2·edit-23 months 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-up1·3 months 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.