Solved

'VK_C' : undeclared identifier

Posted on 2004-10-15
1
1,350 Views
Last Modified: 2008-01-09
Hi experts ,

  Does anyone know why I got a "undeclared identifier" error at line 00 ?? thanks a lot !!!

case WM_KEYDOWN:            
      switch (wParam)
      {
                        
        case VK_C:    // line 00
           // blah ...                   
                    break ;

        case VK_ESCAPE:  
          PostQuitMessage( 0 );
          break;

        case VK_UP:
                     // blah ...

                 case VK_DOWN:
                    // blah ...
             }      
  blah ....      
0
Comment
Question by:meow00
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 31

Accepted Solution

by:
Zoppo earned 300 total points
ID: 12317703
Hi  meow00,


that's because VK_C isn't defined ... there's a hint about this in 'winuser.h':

> ...
> /* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
> /* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
> ...

instead of VK_C simply use 'C' ...

Hope that helps,

ZOPPO
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question