BrickInTheWall
07-07-2009, 01:05 PM
Hi,
I was wondering if it was possible to convert a string like "2x * x + 3x +5" to operators and integers so that this could actually be calculated? I'm sure there is a way but I really don't know how I would go about doing that. I have designed an algorithem before that was able to get easy functions simply by reading each character and then deciding on what to do, but that was very limited, and would be way to complex.
Anybody have a tip of how this can be achieved?
Cheers,
Chris
I was wondering if it was possible to convert a string like "2x * x + 3x +5" to operators and integers so that this could actually be calculated? I'm sure there is a way but I really don't know how I would go about doing that. I have designed an algorithem before that was able to get easy functions simply by reading each character and then deciding on what to do, but that was very limited, and would be way to complex.
Anybody have a tip of how this can be achieved?
Cheers,
Chris