0

Hi,

I am a new programmer - I'm taking a course of C++ programming in College.

I have a quick question - well, I hope it's quick.

After I create a program and try to run the program, the .exe file will pop up and in less than a second disappear.

This does this with ALL of the programs that I have used.

What could be causing this?

I'm currently on Windows Vista.

Thank you for your time!

Jonathan

5
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by vidit_X
0

You can add cin.get(); at the end of main before your return 0;.

I'm guessing your programs don't have any user input or any pauses. Console applications close when they are done.

0

system("pause");
return 0;
use that at the end of ur main method should work:)

I think using system("pause"); is not recommended.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.