Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

vnebojsa

C++.....

This topic is 5387 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone, I started learning C++ and I think I learned enough to create a little calculator. It''s not hard but I''d like to put some graphics in it. I want classic calculator look. How to do that. I know I have to draw that first but how to combine C++ code and graphics. Please help me! Nebo

Share this post


Link to post
Share on other sites
Advertisement
If I was making the calculator graphical, I would use Windows. Basically make an interface (your program interface can be a dialog)... then handle presses of the buttons. You can use a string to store the numbers... then append them to the end of the current string. When the user presses an operator button, you convert the string to a float... and store the operation and number in a static then use them to calculate the result when the user presses another operation, or equals... the "current" number, becomes the result. I hope this explains it for you... there is a good site that does exactly this, and more. This book is a VERY worthwhile read.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by dmounty
<A href="http://www.relisoft.com/book/index.htm">This book</A> is a VERY worthwhile read.

Why do you keep suggesting that book?? You must be connected with the publishers/authors or something.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!