using system()

N

nkomli

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
 
B

Barry

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(/).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top