Path
Hallo everybody!
I'm having problems with paths. Actually, I am trying to do a system call, passing a file as parameter to a software called "wgnuplot.exe", which is located at C:\Documents and Settings\tmoutinho\gnuplot\bin\, this way:
/*code*/
String* path = S"C:\\Documents and Settings\\tmoutinho\\gnuplot\\bin\\Mytext.dat";
/* instructions building the file Mytext.dat*/
system("wgnuplot.exe C:\\Documents and Settings\\tmoutinho\\gnuplot\\bin\\Mytext.dat");
and it doesn't work.
However, changing the path where the file "Mytext.dat" is built to the path where the executable file is built:
/*code*/
String* path = S"C:\\Documents and Settings\\tmoutinho\\estat\\Debug\\Mytext.dat";
/* instructions building the file Mytext.dat*/
system("wgnuplot.exe "C:\\Documents and Settings\\tmoutinho\\estat\\Debug\\Mytext.dat";
and it works.
It seems that in a system call I only can pass a file as parameter if the one is built in the same path where it is located my executable file. But, can't I specify the path I want, building my text file where it is more convenient, or is it mandatory to build the text file in the same directory of my main executable file?
Thanks everyone!
Thiago
|