Skip to main content
gamedev.net
🔒 Locked

[C++] extern issues

Started by chbrules Aug 25, 2005 at 3:28 AM 0 replies 300+ views
Original Post
chbrules
chbrules
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!
-Conrad
chbrules
chbrules
Nevermind, I got it straightened out. I was getting a bug about not defining my constructor and destructor.
-Conrad

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.