Update main.cpp

FIt the gnuplot 5.0rc changes.
If not using "gp_exit", there will some errors.