|
-
January 14th, 2003, 03:35 PM
#1
shell win32 programm - close it - howto
hello,
how i can close a win shell (DOS/Box/Shell) programm automatical?
now it says "press a key to ......."
after the programm stops...
-
January 14th, 2003, 07:08 PM
#2
add the line return 0; to your main method. this only works for console
-
January 15th, 2003, 04:42 AM
#3
i have in code
return 0;
}
but under win98 + xp there comes the sentence still again at my tests...
-
January 15th, 2003, 04:56 AM
#4
well where are you running the exe from? a DOS prompt? windows explorer? or visual studio itself? VS wont drop out automatically but the other 2 will.
-
January 15th, 2003, 05:58 AM
#5
-
January 15th, 2003, 02:11 PM
#6
you want it to close the DOS box? or it's simply not dropping out back to the dos prompt? either way it's weird because i dont think you can do the first and the second should just happen for you.
-
January 15th, 2003, 02:17 PM
#7
yes, just want that the DOS box geht closed automatic.
normaly i can make like system, exit call, but the problem is the "press the key"..... comes after the programm
-
January 15th, 2003, 03:11 PM
#8
Just a wild-guess, but check you program to see if you have cin.ignore(), which will display that message.
... Also, are you starting your program via a batch file and have a pause in the batch file?
-
January 15th, 2003, 04:15 PM
#9
if you type your executable at the DOS prompt your program exits back to it whether or not the "Press any key" message is shown.
i dont think you're actually doing that based on what you describe so i still dont understand how you are launching your program.
when your program runs do you type in the filename in DOS or do you double click something from windows?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|