• 13
• 16
• 27
• 9
• 9

# Incorrect undeclared identifier message??

This topic is 4931 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'm try to use a INPUT and KEYBDINPUT structure from the winuser.h file (included by windows.h) but it keeps saying undeclared identifier, even though when I have INPUT Inputs; and type Inputs. , it shows me a list of the members?! I tried moving the lines that declare it out of the ifdef statements (right to the begining of the .h) but that didnt work either.. Any ideas?

##### Share on other sites
Could you post some code of where the problem is occurring? It might have nothing to do with the include files. It might purely be down to a scoping problem.

Post some relevant code and you'll be more likely to get a more helpful response. [smile]

##### Share on other sites
I know what the problem is. Do this where Windows.h is included:
#define _WIN32_WINNT 0x0500#include <Windows.h>

I too had this bug, so I took a look at Windows.h and found that section of the file (with SendInput and related stuff) needed the above to be defined first. Kind of dumb but whatever.