-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
15 lines (13 loc) · 414 Bytes
/
main.cpp
File metadata and controls
15 lines (13 loc) · 414 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
FILE *command;
//command = _popen( "\"C:\\Program Files\\gnuplot\\bin\\gnuplot\"", "w" ); // XP可用,Vista不行
command = _popen( "pgnuplot", "w" ); // XP Vista 皆可
fprintf( command, "a=-1; b=-2; c=3;" );
fprintf( command, "plot a*x*x+b*x+c\n");
fflush( command );
system("PAUSE");
_pclose( command );
return 0;
}