switch statement

This is a discussion on switch statement within the C Programming forums, part of the General Programming Boards category; I am trying to compile a program with switch statements in it but it is telling me that I have ...

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

    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:
    and
    case ID_BUTTON:

    what is going on...

    And tkahns in andavce.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    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.

    Quzah.
    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, 04:51 PM
  3. Mutli Switch statement help
    By elwad in forum C Programming
    Replies: 9
    Last Post: 05-09-2009, 04: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, 03:17 PM

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