开发者

how to build a calculator in GTK+? [closed]

开发者 https://www.devze.com 2023-01-08 21:52 出处:网络
It's difficult to tell what is being asked here. This question 开发者_如何学Gois ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form.
It's difficult to tell what is being asked here. This question 开发者_如何学Gois ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号