i know i know, how to run a exe from inside a program is in the faq but i need to know how to run one that is in a different directory than the one the program is running in. Im using the system() commad.
(please help)
Skeptic
i know i know, how to run a exe from inside a program is in the faq but i need to know how to run one that is in a different directory than the one the program is running in. Im using the system() commad.
(please help)
Skeptic
This probally involves adding something to your path, so that the system knows where else to look.
"only two things are infinite, the universe and human stupidity, and im not sure about the former." - albert einstein
well i tried things like
system("c:\mydir\myprogram.exe")
but it didnt work
or if its a few directories back,Code:system("Dir1/Dir2/myfile.dat");
Code:system("..\..\dir1\myfile.dat");
I think you can do it that way
i should change my name to stupid, i had the wrong slashes.
Wha? That has never mattered for me.....
Maybe i have never tried them both =)
is there a way to call two programs at the same time, with out waiting for the first one to close?
\ signals an escape sequence \n, \a, \t, \", etc. In order to produce a \ you'd use \\.
So:
system( "C:\\filename" );
If a tree falls in the forest, and no one is around to see it, do the other trees make fun of it?
\\ doesnt seem to work the program still waits till the first is closed then runs the second
If you're trying to run two programs then you need to look into multi-threading. Using the system call won't cut it.
If a tree falls in the forest, and no one is around to see it, do the other trees make fun of it?