In Perl, I can type:
$|++;
and anything printed to STDOUT will be automatically fflush()ed.
Is there an equivalent in C? In other words, is there some way I can tell stdio to automatically fflush stdout after every printf(), the way it automatically flushes stderr?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…