I'm trying to make a simple graphing program.
I want to take this piece of code and change it from graphing hard-coded functions into a function that will take an equation from the user and graph that. My only problem is that I can't think of how to use a string and then have the program read it like it was hard-coded. Am I using the wrong approach?Code:for(x=-10;x<11;x++) { y=(-(x*x))+4; putpixel(buffer,x+320,y+240,(255,255,255)); blit(buffer,screen,0,0,0,0,640,480); delay(100); }