CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Is there such a thing as code withdrawal in a compiler?

    Quote Originally Posted by riechan View Post
    Which is odd, because it was working properly with the deposit function. Then again, I didn't really compare x and acct.bal in deposit().
    Please get a real development system that has a debugger, or start learning how to use the debugger in the environment you're using. If your environment doesn't have a debugger, throw it away and get one that does have a debugger.

    You can't muse over code thinking that things are happening or not happening. You can't write programs this way. You have to learn how to use a debugger so you know what is being done, and not just guess. Without a debugger, it becomes trial and error coding, where the trials may never end. A debugger gives you an exact representation of what your program is doing, so that you can pinpoint what needs to be fixed or adjusted.

    What if your program becomes hundreds or thousands of lines? No human being can keep track of thousands of loops, variables, if statements, etc. or the flow of a complex program when given certain input by eyeballing code. In addition, the debugger will help you learn what your program is doing.

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; August 9th, 2013 at 05:29 AM.

  2. #17
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,822

    Re: Is there such a thing as code withdrawal in a compiler?

    Quote Originally Posted by riechan View Post
    EDIT2: I changed the values to integer, but it still did not compare properly. Odd.
    The program is working as written! See my post #15!
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  3. #18
    Join Date
    Jul 2013
    Posts
    30

    Re: Is there such a thing as code withdrawal in a compiler?

    It's okay now. Solved it! I'm such a scatterbrain! hahaha

Page 2 of 2 FirstFirst 12

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