c++ : Use of System() to execute .exe with parameters

Hello,

I 've trie to execute a a program with parameters unsuccessfully and i take the above message :

"The system cannot find the path specified."

I used a variaton of the above command :
system("\"C:\\xxx\\xxx\\xxx.exe -xxx -xxx xxx.xxx xxx.xxx xxx.xxx\"");

Thanks in advance

Can I assume the X's are actual values in your code?

One problem is that you are using a UNIX library call on a DOS platform. If you are using the mk or cygwin toolkits, this might actually work. Otherwise, check your compiler's documentation about the system() call.

One problem is that you have included double-quotes inside the system call. This probably won't work. It might work if you start the double-quotes AFTER the first space. So:

system("\"C:\\xxx\\xxx\\xxx.exe -xxx -xxx xxx.xxx xxx.xxx xxx.xxx\"");

My guess is, however, no quotes are needed here at all.

I am usind Dev C++, the below it doesnt work too

system("C:\\xxx\\xxx\\xxx.exe -xxx -xxx xxx.xxx xxx.xxx xxx.xxx");

I think that the quotes are necessary. Your idea doesnt work.
I use Dev c++

Is it the same error?

I would post a more descriptive path to the executable, say what you would key in the cmd window.