|
-
January 21st, 2013, 01:10 PM
#9
Re: My calculator program keeps crashing at the end
 Originally Posted by GCDEF
Following your design, you could have a GetAandC() function. After you find out which operation the user wants, set up an if or switch statement like
Code:
if(b == "*")
Multiply();
else
if(b == "/")
Divide();
...
Also, you really need to forget you've even heard of the goto statment. NO respectable C++ programmer would use it. Learn how to use while and for loops to repeat operations.
Also, when posting, please use CODE tags to preserve formatting.
It works and makes it neater. Thank you~
This program gave me the biggest headache last night, so thank you very much for the help
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|