Solved

C++ Source Code for Calculator

Posted on 1997-11-18
4
161 Views
Last Modified: 2010-04-10
Looking for C++ Source Code for a four function (add,subtract, multiply, divide) calculator using classes can anyone help me, PLEASE!!!!!
Additional info: application to simulate a simple four function electronic calculator, must contain two registers to store operands in use, one register to store result of arithmetic operation, a register to store error state
and a register to store name of most recent arithmetic operation. Program is to have an object-oriented approach
0
Comment
Question by:wattm
4 Comments
 
LVL 2

Expert Comment

by:rigansen
ID: 1173504
Sorry but I don't understand the whole idea !!

Are you talking about parsing a string like "234*(2+5)/9" and then calculating the final result ??

I think you should make yourself a little more clear... ok??


0
 

Author Comment

by:wattm
ID: 1173505
Edited text of question
0
 
LVL 5

Expert Comment

by:yonat
ID: 1173506
This is a common example in many introductory books, includeing "The C++ Programming Language" by Bjarne Stroustrup.
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 100 total points
ID: 1173507
This also sounds like a university/college assignments.

Most reputable experts won't give students full code solutions - but will gladly help out with any problems students who are having particular problems with the code they've already written.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

867 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

17 Experts available now in Live!

Get 1:1 Help Now