views:

21

answers:

1

I have a simple C++ program that uses cout and printf to log stuff and it is only showing at the end when the program is closed but if I'm stepping through the program using debug nothing is shown. Did anybody have this problem? This is probably a punishment for doing homework for someone else. :|.

+2  A: 

If you're practicing c try fflush, if c++ try cout << endl; each time you want to print.

Guillaume Lebourgeois
I already tried endlines. No effect. I thought there was a simple way. Something like cout.flush() which also doesn't work. Oh well.
kudor gyozo
Hmm.. I think endl works after all. Probably magic. Thanks. I though it was something more serious.
kudor gyozo