I am programming a graph plotter, and I have set up the coordinate system and plotted a function by entering the code in the program....but how would it be possible to plot a function that I enter in an edit box in a dialog....fx: 2*x+1 ????
Printable View
I am programming a graph plotter, and I have set up the coordinate system and plotted a function by entering the code in the program....but how would it be possible to plot a function that I enter in an edit box in a dialog....fx: 2*x+1 ????
hmm you'd have to write an expression parser for that I think.
I've read a book (C++ the complete reference (4th edition)) which contains code for a simple expression parser.. their code is freely available online:
http://www.osborne.com/products/0072...26803_code.zip
it's the last appendix..
I don't think it's the most effecient code, but this should help you out a bit I guess.
Do a search on google if you need more info.
Good luck!
thanks ;)