Ask your own question, for FREE!
Computer Science 24 Online
OpenStudy (anonymous):

how can i reset my calculator program in c++

OpenStudy (e.mccormick):

As in, when you hit the clear key to reset all the variables? If you do the entire process in a class, you could use setters to change things back to defaults. Otherwise, you could do something like have the clear key cause the present answer to equal 0.

OpenStudy (anonymous):

hmmm i know but i can't understand what is the code behind this ...

OpenStudy (anonymous):

can i show the code program of calculator , and u add the reset function in it ?

OpenStudy (anonymous):

show the code

OpenStudy (anonymous):

@mishii : Provide the code..so that may be we can help

OpenStudy (rsmith6559):

Resetting a calculator would put it in the same state that it's in after the constructor runs, wouldn't it?

OpenStudy (e.mccormick):

Depends on how the calculator is made. Without seeing the code, we do not know if it is object orientated at this point.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!