tags:

views:

46

answers:

1

what's the logic behind the calculator widget. i want to build it in gtk+.

+1  A: 

First, don't listen to anyone who says that this is trivial.

Second, I'm going to assume that you really mean something like "How do I convert the user input to an internal expression structure which I can use to calculate the answer?". Well, Wikipedia has a good article (here) on converting infix (human readable) notation, which is what most modern calculators use (e.g you can write 1 + 2 instead of + 1 2), to the more computer appropriate polish (prefix) notation.

Third, if you don't know GTK+ yet, start here.

Hope this helps.

manneorama
I think flagging beginners with even what seems as trivial question is not the correct way to introduce them to a community. I think the approach you have taken is very commendable.. +1 for u effort... :)
Shouvik
thanks every one :)
Lava