Solved

'VK_C' : undeclared identifier

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

Title # Comments Views Activity
Unable to start eclipse ? 17 154
trigs fail! I thought I knew how to do trignometry 3 75
Gaming Software 1 19
I could not set window to top 4 22
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

830 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