Need help with C programming

Discussion in 'Computer Games and General Discussion' started by Feels Good Man, Oct 15, 2010.

  1. Feels Good Man
    OP

    Feels Good Man GBAtemp Advanced Maniac

    Member
    1,643
    19
    Apr 15, 2007
    Canada
    What's the proper format to put a switch statement inside a while statement so that if you dont input a correct number specified, it'll ask you to input a number again?

    I did something like this:
    http://pastebin.com/GR37c4UB

    Is that correct? It doesn't seem to work properly when I add more stuff to this program im trying to make >__>. It totally skips that while statement and just goes to the next category.
     
  2. gotchapt

    gotchapt GBAtemp Regular

    Member
    159
    0
    Sep 6, 2009
    it skips the while() because choice is not yet initialized between 1 and 4