Visual Studios

Posts 1–7 of 7 · Page 1 of 1
Visual Studios
When ever I run my program it opens the closes instantly how do I fix it
Quote Originally Posted by adnaan99 View Post
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?
Quote Originally Posted by RuShi View Post
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.
Quote Originally Posted by Gill Bates View Post
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
Quote Originally Posted by adnaan99 View Post
Thanks cin.get(); worked fine guess I cant forget to add it in now
No problem, glad it helped.
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us