Can someone look at my simple program and tell me what is wrong with it?

This is a discussion on Can someone look at my simple program and tell me what is wrong with it? within the C++ Programming forums, part of the General Programming Boards category; Actually, I would use a do while loop here. Do while works like this: Code: do { //code that repeats ...

  1. #16
    Registered User
    Join Date
    Apr 2006
    Posts
    2,021
    Actually, I would use a do while loop here. Do while works like this:
    Code:
    do {
        //code that repeats goes here
    } while(expression); //repeat until expression is false.
    //put code for what to do after the loop here.
    The reason for preferring do while to an infinite loop and a break is that it is more clear to see when the loop terminates.
    Last edited by King Mir; 09-30-2007 at 10:59 PM.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

  2. #17
    Registered User
    Join Date
    Sep 2007
    Posts
    29
    I did it! Thank you so much everyone for your help!

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

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