Jump to content
  • Advertisement
Sign in to follow this  
wease

Odd VC++ "undeclared identifier"

This topic is 4872 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!