Register
4coder»Forums»MSVC Compiler don't see output of printf
Adrien
7 posts
MSVC Compiler don't see output of printf
1 month ago Edited by Adrien on July 12, 2020, 2:29 p.m. Reason: Initial post
For exemple I saw 'hey!' only when I close the executable.
1
Print("Hey!\n");
Simon Anciaux
855 posts
MSVC Compiler don't see output of printf
1 month ago
To be clear, you're trying to run one of your executable from 4coder ?

Could this be similar to this issue: printf to buffer only appearing after buffer get to a size ?

Try adding fflush( stdout ); after the prints to make sure they go out to the screen.
Adrien
7 posts
MSVC Compiler don't see output of printf
1 month ago
Okay if I add fflush( stdout ); it work. But they is no other solution to just add fflush( stdout ); after each printf ?
Mārtiņš Možeiko
2109 posts / 1 project
MSVC Compiler don't see output of printf
1 month ago
You can disable buffering on stdout with this:
1
setvbuf(stdout, NULL, _IONBF, 0);