Advertisement Jump to content
Sign in to follow this  

[C++] extern issues

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

What I've done is defined a class to load data from flag files in my application (CLoad), then I have another class that is the engine of the applicaiton to handle all the centralize processing and functionality (CEngine). Now I've created a global pointer of CLoad called Load in the header file where it's defined. What I want to do now is initialize it to a new instance of the CLoad class and use it within my CEngine class objects. I'm pretty stumped about how to go about this. I tried including the header for my CEngine class header and declaring the extern pointer again, but it's a no go. The compiler says it can't find that datatype (CLoad) even though I included the header of CLoad. I'm a bit new using external linking between files in C++ if you can't tell. :) Thanks!

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!