2009-02-02, 07:14 PM
Its a basic parsing problem. What you need is a tokenizer to break the string into "tokens", a parser to parse the string for correct syntax and objects creation. The class hierachy should be something like this:
basic
class Char
class Int
class Float
expressions
class Add
class Divide
class Bracket
As you can see, Add and Divide take in 2 arguments, Bracket takes 1, etc. The rest you should learn for yourself.
basic
class Char
class Int
class Float
expressions
class Add
class Divide
class Bracket
As you can see, Add and Divide take in 2 arguments, Bracket takes 1, etc. The rest you should learn for yourself.

