Sign in to follow this  

Incorrect undeclared identifier message??

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
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 this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this