Jump to content
  • Advertisement
Sign in to follow this  
suliman

why are my classes unknown?

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

why is the line 'class gameGFX;' needed? Its declared in gameGFX which is included... But without that line it doesnt recognize gameGFX. Thanks #ifndef MAIN_H #define MAIN_H #include <hge.h> #include <hgesprite.h> #include <hgefont.h> #include <hgeparticle.h> #include <hgecolor.h> #include <fmod.h> #include <list> //non-game specific #include "def.h" #include "basic.h" #include "gameGFX.h" #include "gameGUI.h" //game specific #include "world.h" #include "actor.h" extern HGE * hge; class gameGFX; extern world www; extern gameGFX gfx; extern gameGUI gui; #endif

Share this post


Link to post
Share on other sites
Advertisement
An related issue:

I have a int2 class in basic.h
I have a unit class which need this class in unit.h
I have a main.h which holds all header-files so i include that one in other files.

Now:
In unit.h i include main.h so my unit can have int2 as members.
If i include unit.h in main.h (below basic.h) the int2 in unit.h is suddenly unknown!

why? the basic-header is above it?

Thanks
E

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!