Solved

Simple Visual C++ calculator

Posted on 2002-07-25
11
5,146 Views
Last Modified: 2013-11-20
Hi,

is there someone who has already done a simple calculator in Visual C++. What I need is a sample, which does +, -, *, /. Not more.

If yes, please note a message here and send the complete project to ps2@a-city.de

Yours
Stephan
0
Comment
Question by:spetrowitsch
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 12

Expert Comment

by:migel
ID: 7176589
Hi!
do you need GUI? or just calculation engine?
for example some code you can found in the  Bjarne Stroustrup "The C++ programing Language" third edition
0
 
LVL 86

Accepted Solution

by:
jkr earned 200 total points
ID: 7177584
Check http://www.codeguru.com/misc/Calculator.html

Quote from the page: "This article give you the necessary code to create a text-based calculator. The calculator can handle variables, complex numbers, and draw functions."
0
 
LVL 8

Expert Comment

by:fl0yd
ID: 7179280
You might also check out Bjarne Stroustrup's "The C++ Programming Language". If I'm not mistaken he develops a simple, yet expandable calculator in one of the first chapters. Apart from solving your problem it also shows a very comprehensive piece of code -- I was surprised to see how few lines of code are actually needed to make up a complete calculator.
0
 
LVL 8

Expert Comment

by:fl0yd
ID: 7179281
Oooops, migel already said so -- just ignore my previous post...
0
 

Expert Comment

by:mousebyte
ID: 7814986
looks like he wants his assigment done for him

uni uses software to check if the assignment matches any on the web

and the cutrrent assignment is "calculator" in c++

what is the point in takingthe unit if you are just going to cheat (especially when C++ is so much fun )

mind you it is summer school, so it includes failed students who are going for a remark !
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 8

Expert Comment

by:fl0yd
ID: 7815399
Seriously, mousebyte, I would have expected a bit more support from someone who claims to be a teacher, rather than suspicious bad-mouthing. Even if spetrowitsch needs help with his/her assignment I cannot find anything wrong with striving for inspiration. I take it you do not own any books other than those written by yourself and you never went to school either, since you wanted to demystify the dark secrets of mathematics all by yourself. By the way, how is the re-invetion of the wheel coming along?

.f

p.s.: c++ may be fun once you master it [I seriously doubt that you do]. Learning it is still major pain in the ass, though.
0
 

Expert Comment

by:mousebyte
ID: 7815455
no i have not written any books

i am a 4th year student myself (with a GPA of 89% if you care to attack my student status thus I also teach)

i get my grades by working hard and learning, it is fine to help and learn by looking

but seriously what do you get out of cheating ? that certainly doesn't help your understanding !

why do you think he asked for the assignment to be posted directly (and the whole project at that) to his email account rather than being posted on here

how did you get your grades ? by hard work or cheating ?

I wouldn't want to work in a team with people who got their grades by cheating rather than learning the stuff


0
 

Expert Comment

by:mousebyte
ID: 7815463
and yes I teach at UNIVERSITY

you retard
0
 

Expert Comment

by:mousebyte
ID: 7815468
and i never said that i had mastered C++

but yes i like programing very much

you have a serious inferiority complex
0
 
LVL 12

Expert Comment

by:migel
ID: 7815572
BTW adding comments to the closed answer after the HALF YEAR is so strange :-)
Is you dig out some arcives? :-))))
IMHO answer is closed and no comments required
bye
0
 
LVL 8

Expert Comment

by:fl0yd
ID: 7815745
Actually I should turn this in to the community support, but I'd rather give you the chance right here to set things straight, mousebyte.

.f
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now