ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Понедельник
15 сентября
1541299 Топик полностью
bodisEx (10.09.2025 15:01, просмотров: 115) ответил IBAH на И как мне ее вызвать? она же FILE *.
The stdout stream is line buffered by default, so will only display what's in the buffer after it reaches a newline (or when it's told to). You have a few options to print immediately: 

Print to stderrinstead using fprint (stderr is unbuffered by default):

fprintf(stderr, "I will be printed immediately");

Flush stdout whenever you need it to using fflush:

printf("Buffered, will be flushed");
fflush(stdout); // Will now print everything in the stdout buffer

Disable buffering on stdout by using setbuf:

setbuf(stdout, NULL);


Or use the more flexible setvbuf:

setvbuf(stdout, NULL, _IONBF, 0);