Math Function Input
I have to write a program that allows a user to input a math function +-*?^sincostan...and I will have to draw using openGL.
I need to figure out a way to input the function and parse it to do the math to get the points for the graph. I can get the points, but inputing the function to do the math confuses me. Any suggestions?
1) Read the character: +, -, *, etc.
2) If character == '+' do something, if character == '-' do something else, etc.
googling for 'conversion to postfix notation' might help.