Solved

'VK_C' : undeclared identifier

Posted on 2004-10-15
1
1,335 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
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

776 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