Closed ghost closed 8 years ago
tks god, i found the answer: http://stackoverflow.com/questions/14858262/stdcout-wont-print
i need to call cout.flush()
but i still don't know why i have to call 'flush'.
most of the time nobody needs to call 'flush'
There are no guarantees that a flush is called when you use std::cout
, unless using std::endl
, std::flush
, or when a program exits. In the case above, I would simply write cout << "abs" << endl;
when using std::cout
for testing purposes.
ah yeah, endl works
the code inside a handler works as usual, except 'cout', for example:
it doesn't print out anything
doesn't print out 'xyz' too