Thread: switch /case

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    65

    switch /case

    How do I input multiple cases?

    case 1 and 2:
    ...
    break;
    case 3 and 4:
    ......

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    835
    Using switch's fall-through:
    Code:
    case 1:
    case 2:
    ...
      break;
    case 3:
    case 4:

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 08:35 AM
  2. ascii rpg help
    By aaron11193 in forum C Programming
    Replies: 18
    Last Post: 10-29-2006, 01:45 AM
  3. Switch
    By cogeek in forum C Programming
    Replies: 4
    Last Post: 12-23-2004, 05:40 PM
  4. Switch Case
    By FromHolland in forum C++ Programming
    Replies: 7
    Last Post: 06-13-2003, 03:51 AM