Monday, May 24, 2010

How can you make c++ program end itself?

Whenever a c++ program that I make ends, no matter whether it is by using "return" or "exit(0)", it always displays, "Press any key to continue" before the window closes itself. Is there a way to get rid of this message and have the window close itself without having to press a key?


I am just learning c++ and I haven't been able to find the answer to this question anywhere else. I've got Microsoft Visual Studio.net 2003.


Thanks

How can you make c++ program end itself?
this is a default benefit provided by ms. otherwise u need to use getch() to get the output on ur screen or press alt+f5.


if u want to remove it there is pragma supress. but to get upto that point u need to kow a lot. till then keep suffering. :)or use any other compiler like turbo c++
Reply:Miscrosoft Visual studio provide this facility by default .. if u wan to change browse seetings ..if u can't chnage it use other compilers like borland or turbo ..well ur learning ..i think these complilers will make u sense of Basics also .
Reply:use getch()


that shld be fine acc to me.


No comments:

Post a Comment