Embarcadero / Dev-Cpp

A fast, portable, simple, and free C/C++ IDE
https://www.embarcadero.com/free-tools/dev-cpp
GNU General Public License v2.0
2.43k stars 265 forks source link

Program output is not fully output #258

Open Duy-Thanh opened 1 year ago

Duy-Thanh commented 1 year ago

I had a rather strange problem today: My application's output was not output to the full Command Prompt (i.e. pressing the F10 or F11 key while in Dev-C++).

As far as I know, Dev-C++ uses ConsolePauser to run my application.

No, this is not a code problem. Because I'm sure it works fine when running it with Command Prompt (i.e. don't press F10 or F11 in Dev-C++, but run the exe file with double click exe file in Windows Explorer)

This is the output I get when using Dev-C++, it doesn't fully output:

image

As can be seen, the problem is immediately apparent when we look at the cursor position of the command line window. And then I add the command:

exit(0);

image

Not even message the program exited with error code and program runtime. Pressing the key will automatically close the command window:

image

And this is when I run the program without Dev-C++, the output is fully output:

image

So I had to resort to this way to get around the error. However, I hope this bug will be fixed. I believe the error comes from ConsolePauser.exe