C++ warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
I am using gnuplot to draw a graph in C++. The graph is being plot as expected but there is a warning during compilation. What does the warning mean? warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings] This is the function I am using: void plotgraph(double xvals[],double yvals[], int NUM_POINTS) { char * commandsForGnuplot[] = {"set title \"Probability Graph\"", "plot 'data.temp' with lines"}; FILE * temp = fopen("data.temp", "w"); FILE * gnuplotPipe = popen ("gnuplot -persistent ", "w"); int i; for (i=0; i < NUM_POINTS; i++) { fprintf(temp, "%lf %lf \n", xvals[i],