What am I doing wrong?

This is a discussion on What am I doing wrong? within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by Neo1 This should help, the loop will now stop when the end of the file has been ...

  1. #31
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    Quote Originally Posted by Neo1 View Post

    This should help, the loop will now stop when the end of the file has been reached, and it'll also stop if under == false...
    This code was shown to the OP several times. What we are trying to achive here - make the OP realize WHY it was written that way...
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  2. #32
    Registered User
    Join Date
    Feb 2008
    Posts
    40
    Quote Originally Posted by Daved View Post
    >> When I checked my output it equaled the amount I got from using the calculator.

    But did you try that specific case? The point is that if you get to the end of the file and are still under 1000 then you'll have problems.
    Ahh, got ya. Thank you all for your help with that. Sorry to be such a nuisance. This is all new to me and I am trying very hard to understand everything. Sometimes it is difficult for me to understand what you all are trying to tell me or show me as I have not had that much exposure to programming. Some of the things you show me in code are greek. I just don't understand them. Basically, I only know some of the basics but I am learning a lot and getting a better picture with all of your inputs. Thank you again.

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 07-15-2004, 03:30 PM
  2. Debugging-Looking in the wrong places
    By JaWiB in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 11-03-2003, 09:50 PM
  3. Confused: What is wrong with void??
    By Machewy in forum C++ Programming
    Replies: 19
    Last Post: 04-15-2003, 12:40 PM
  4. God
    By datainjector in forum A Brief History of Cprogramming.com
    Replies: 746
    Last Post: 12-22-2002, 11:01 AM
  5. Whats wrong?
    By Unregistered in forum C Programming
    Replies: 6
    Last Post: 07-14-2002, 01:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21