DEV Community

Discussion on: std::cout is not printing in console/terminal

Collapse
 
cnskn profile image
cnskn

Hello,
Never experience this problem, but what is even more odd is that endl do call flush as well (check en.cppreference.com/w/cpp/io/manip...)

I'm wandering what compiler/std/OS you used?

Collapse
 
lucpattyn profile image
Mukit, Ataul

Mac OSX and gcc/g++ compiler.

Collapse
 
lucpattyn profile image
Mukit, Ataul

Thanks, i actually forgot the endl in the program :) .

then used cout.flush() and when it started working i added the endl again.

Thanks for correcting this tip :)