Thread: switch statement

  1. #1
    That weird Java guy xniinja's Avatar
    Join Date
    Jun 2010

    switch statement

    I am trying to compile a program with switch statements in it but it is telling me that I have "duplicate case values"

    but the case values are

    case WM_DESTROY:
    case ID_BUTTON:

    what is going on...

    And tkahns in andavce.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    The macros for WD_DESTROY and ID_BUTTON probably share the same number (say 3 for example). Replace 'WM_DESTROY' with whatever value it really has, do that for all the macros, and you'll see your problem.

    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. issue with switch statement
    By bluetxxth in forum C Programming
    Replies: 14
    Last Post: 02-24-2010, 10:01 AM
  2. Switch Statement Errors
    By melodia in forum C Programming
    Replies: 7
    Last Post: 10-25-2009, 03:51 PM
  3. Mutli Switch statement help
    By elwad in forum C Programming
    Replies: 9
    Last Post: 05-09-2009, 03:19 AM
  4. Switch statement / default:
    By kcpilot in forum C Programming
    Replies: 4
    Last Post: 12-02-2008, 03:14 PM
  5. switch statement
    By guillermoh in forum C Programming
    Replies: 5
    Last Post: 03-10-2008, 02:17 PM