From: kemal a. <as...@cl...> - 2004-01-18 16:32:42
|
I would like to put the following in the records. thanks to : Hans-Bernhard Broeker <br...@ph...>. here is a working solution to drive gnuplot Version 3.7 patchlevel 3. on windows2K built with VC6.0. // consol.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <stdio.h> using namespace std; int main(void) { FILE *chkdsk; if ( (chkdsk = _popen( "pgnuplot.exe", "wrt")) != NULL) { fputs("plot sin(x)\n", chkdsk); fflush(chkdsk); //Works perfectly now system("pause"); //needed otherwise gnuplot closes when //the console app ends to fast to see anything } printf("DONE!\n"); return 0; } |