You'll need to write an expression parser.
Not a beginner's job, though not all that tricky.
There are several books (and no doubt websites) that contain sample code for simple parsers that you can use for inspiration.
jwenting 1,905 duckman Team Colleague
jonsca commented: Yes +4
Salem commented: Yup, just another dump "project" thread +20
Nick Evan commented: probably true. +12
Rashakil Fol commented: stuuuuuuuuuuuuupid +7
jwenting 1,905 duckman Team Colleague
MaxWildly commented: He help me see the answer in a clear way. +1
raymyster commented: what a loser +0
Salem commented: What a winner! +19
Rashakil Fol commented: nice but you forgot to bleep out the name! +7
Salem commented: LOL :) +19