CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Threaded View

  1. #6
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: My calculator program keeps crashing at the end

    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.
    Last edited by GCDEF; January 21st, 2013 at 12:06 PM.

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
  •  





Click Here to Expand Forum to Full Width

Featured