Jump to Content
Register
Log in
Forgot your password?
Third-party login
Hand made
4coder
Blog
Forums
twitter
4coder
»
Forums
← Back to index
NayGames
Adrien
6 posts
#23052
MSVC Compiler don't see output of printf
3 years, 9 months ago
Edited by
Adrien
on
July 12, 2020, 2:29pm
Reason: Initial post
For exemple I saw 'hey!' only when I close the executable.
1
Print("Hey!\n");
mrmixer
Simon Anciaux
1341 posts
#23055
MSVC Compiler don't see output of printf
3 years, 9 months 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.
NayGames
Adrien
6 posts
#23056
MSVC Compiler don't see output of printf
3 years, 9 months ago
Okay if I add fflush( stdout ); it work. But they is no other solution to just add fflush( stdout ); after each printf ?
mmozeiko
Mārtiņš Možeiko
2563 posts / 2 projects
#23058
MSVC Compiler don't see output of printf
3 years, 9 months ago
You can disable buffering on stdout with this:
1
setvbuf(stdout, NULL, _IONBF, 0);
← Back to index
Log in
to reply