My code is
int gnuplot() {
FILE *gnu;
gnu = _popen(" gnuplot ", "r");
fprintf(gnu, "plot \'C:/Users/user/Documents/gnuplot/cpp/FFT/file.dat\' with linespoints \n ");
fflush(gnu); // I'm not sure how or if this will help, I thought it was related
_pclose(gnu);
return 0;
}
At the moment I am able to just open the CMD window of the gunplot window but not enter the plot command or exit it.