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
    2
    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
    2
    Sep 6, 2009
    it skips the while() because choice is not yet initialized between 1 and 4
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice