When ever I run my program it opens the closes instantly how do I fix it
Originally Posted by adnaan99
When ever I run my program it opens the closes instantly how do I fix it
You mean when you run the Visual Studio and its auto-close?
Originally Posted by RuShi
You mean when you run the Visual Studio and its auto-close?
ya thats right
If you are using a console application this is intended behavior, as it is meant to be run from a command prompt window. If you want to keep it open when running from VS just add a line of code to read from the input at the end of the program.
Might be able to use cin.get();
You can also use system.oause, but that keeps your processor running, so I do not recommend it.
Originally Posted by Gill Bates
Might be able to use cin.get();
You can also use system.oause, but that keeps your processor running, so I do not recommend it.
Thanks cin.get(); worked fine guess I cant forget to add it in now
Originally Posted by adnaan99
Thanks cin.get(); worked fine guess I cant forget to add it in now