Dev C++ Output Window Disappears

Feb 13, 2018 Windows 10 - No Audio Output Device is installed Hello Everyone Recently my laptop running windows 10 was turned off due to power cut-off (Battery was removed). After I restarted windows it didn't boot so I restored it to a previous state. Apr 13, 2020  How do I retain output window in Dev-C. 11 Years Ago. Dev-C v 4.9.9.2 IDE. When I compile and run my program as a console project, a window flashes very briefly on the screen and disappears. The compile log says compilation was successful and execution terminated.

I compiled and ran the 'hello world' program - we're all familiar with it I'm sure, but I have the following problem:
When I run the .exe file the hello world window appears only for an instant, then disappears - I have no way of knowing what the window actually says. I can assume that it is saying Hello World, but how can I get it to stay on my screen?
I am using the following code with Dev-C++:
#include <iostream>
int main()
{
std::cout << 'Hello World!n';
return 0;
}
Any help is greatly appreciated. I wouldnt mind getting this stumbling block behind me so I can start to really learn.

Dev-C++ v 4.9.9.2 IDE
When I compile and run my program as a console project, a window flashes very briefly on the screen and disappears. The compile log says compilation was successful and execution terminated.

How to I keep the window (my output window?) from disappearing?

  • 7 Contributors
  • forum 13 Replies
  • 3,689 Views
  • 8 Years Discussion Span
  • commentLatest Postby Mohit_12Latest Post

Ancient Dragon5,243

Window

Dev C++ Output Window Disappears 10

You have to add a line just before the end of main() to stop the program from closing. Most people call getch() or c++ cin.get(), which is just waiting for keyboard entry.