using system()



 DEVELOP > c-Plus-Plus > using system()

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: ""
Date: 16 Jan 2008 03:33:26 AM
Object: using system()
I have a C++ program that outputs a txt file. I want to call gnuplot
from the program to graph the data but its not working..
Here is function call
system("wgnuplot.exe c:\\gnucommand.txt");
Here is the text for gnucommand which is in C:\ and the same folder as
wgnuplot.exe
set style data lines
set log y;
plot "res.dat" using 1:2 title 'X', "res.dat" using 1:3 title 'Y',
"res1.dat" using 1:2 title 'X1',"res1.dat" using 1:3 title 'Y1';
pause -1
it works fine with just wgnuplot.exe
.

User: "Barry"

Title: Re: using system() 16 Jan 2008 04:50:51 AM
wrote:

I have a C++ program that outputs a txt file. I want to call gnuplot
from the program to graph the data but its not working..

Here is function call


system("wgnuplot.exe c:\\gnucommand.txt");

this is off-topic here,
since the command line syntax is platform dependent.
I guess the GNU software does NOT accept backslash(\), try slash(/).



Here is the text for gnucommand which is in C:\ and the same folder as
wgnuplot.exe


set style data lines
set log y;
plot "res.dat" using 1:2 title 'X', "res.dat" using 1:3 title 'Y',
"res1.dat" using 1:2 title 'X1',"res1.dat" using 1:3 title 'Y1';
pause -1


it works fine with just wgnuplot.exe

--
Thanks
Barry
.


  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER