Sign in to follow this  

Odd VC++ "undeclared identifier"

This topic is 4531 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 have a dialog that has a class associated with it ("MyDialog.h"). If I include this file in a class that I have made myself ("MyClass.h"), I get an undeclared identifier error which shows up at the // Dialog Data enum { IDD = IDD_MYDIALOG }; part of the MyDialog.h file. However, if I include MyDialog.h in another file generated by VC++ and uninclude it from MyClass.h , I get no error and everything compilies fine. I cannot figure out why there is a problem with the ID. It is declared on the dialog as IDD_MYDIALOG. Thanks for any help any one can provide.

Share this post


Link to post
Share on other sites
Quote:
Original post by wease

// Dialog Data
enum { IDD = IDD_MYDIALOG };

Thanks for any help any one can provide.



Given the construct I assume you're using MFC. Every once in a while this happens when the header and cpp files are generated without including the resource.h header (where IDD_MYDIALOG is typically defined)

Share this post


Link to post
Share on other sites
thanks so much for your help. You guys where right. Funny about that resource.h file. I don't see it included in any of my other classes and none of them have problems with IDD being an undeclared udentifier.

Share this post


Link to post
Share on other sites

This topic is 4531 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