Jump to content
  • Advertisement
Sign in to follow this  
chbrules

[C++] extern issues

This topic is 4834 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
Advertisement
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!