I am using VS2010, and I would like to call the exe file that I created in another directory. I tried the following:
int main(){
system("C:\\Users\\Li\\Desktop\\Debug\\modelExample_4pcs.exe");
return 0;
};
but I get the message "Error in the system could not find the file."
I tried to run the exe file directly from the command line, and it only works when I get to its directory. Could you tell me how can I run it from another directory?
(I am using win7)
Thanks, Lee.
source
share