C++ Console Application Closing As Soon As It's Done Processing.

Posted on 2009-04-11
Medium Priority
Last Modified: 2012-05-06
When Ever I Click On My C++ Console Application It Closes As Soon It's Done Processing. How Can I Prevent It From Doing This?
Question by:kor786
  • 2
LVL 86

Accepted Solution

jkr earned 500 total points
ID: 24122532
There are two simple way to prevent that, both based on the user having to press a key. You can either just wait for some input using e.g.



char dummy[100];


char dummy[100];
cin >> dummy;

Author Comment

ID: 24124643
Thanks, It Works!
LVL 86

Expert Comment

ID: 24125621
Grat. BTW, don't forget to close your questions once your problem is solved ;o)

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

587 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question