|
-
January 21st, 2013, 12:47 PM
#7
Re: My calculator program keeps crashing at the end
 Originally Posted by GCDEF
If you're looking for opinions, I'd suggest a separate function that gets the numbers, and passing those numbers to the add, multiply functions. Any time you're doing the same thing repeatedly, you should be using a function that you call.
Why do you have calls like
else
multiplyA();
in all operation functions?
You know the operation type in whateva. Just call the appropriate function after enterB.
I started learning like two days ago... It was the only way I could think of this working. And so it can respond with "Nice, what are you (adding/subtracting/multiplying/dividing) 5 by?"
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
|