![]() |
Quick n00by question...
Well if you've read my posts before, i am a noob...
just a quick question... I want to cout<<"Press any key to Enter"; or cout<<"Press Enter/Return to Enter"; and the cin>> ent; should launch a file which is located at ./prgm/ddww.exe how do i do that??? i need to know this because i'm having bad luck with batch files... thanks. |
You're having trouble double clicking a batch file? Opening a batch this way has the same effect as clicking on it. Well here it is anyways:
:
#include <iostream> |
you can use system function call.
:
system("./prgm/ddww.exe"); |
thank you both.
does any one know how to make both files open in the same window? |
what?????
this isnt working. its bring me the same results as the batch files... all my pages are different .exe's and if i open the "ddww.exe" through something else, like a .bat file or this exe, its closing at the time i open a page... what ever im just going to mix the 2 pages. thanks for the help. |
For a batch file, use the 'Call' command: Call some.exe
Although I'm wondering what you mean by "pages". Whatever it is you're after doing, there is probably a better way to achieve it than through calling multiple executables with a batch file. |
Try running your program through the console it shouldn't disappear that way.
|
Put system("pause"); in your code, just before it returns.
|
Better than a system call (non portable), put a statement that's part of the standard library that requires input from the user. Discard the input and move on to termination.
|
add a pause at the end of the batch file.
|
| All times are GMT -5. The time now is 9:27 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC