i cannot to see what i write to the console (Eclipse C++) during debugging
for (int i=0; i<5; i++) {
cout << i;
}
How to configure Eclipse writting on console while debuging ?
related Eclipse CDT : running C++ program not showing anything in the console! Why? Eclipse CDT : running C++ program not showing anything in the console! Why? C++ program written in Eclipse using Windows and MinGW cannot display output to console view or it might be a bug if you are on win x64: https://bugs.eclipse.org/bugs/show_bug.cgi?id=236330
It is not Eclispe (which is an editor, not a compiler; probably your Eclipse would run a compiler like GCC using the g++
program; and then you are running the compiled executable.).
If you don't see your expected output, it is probably because your output stays buffered.
You could try the std::flush manipulator.
for (int i=0; i <5; i++)
std::cout << i << std::flush;
See this question and the several good answers there.
You might read more about the std::endl manipulator. I suggest doing std::cout << std::endl
from time to time.
You could consider using the std::clog output stream.