Sign in to follow this  

why are my classes unknown?

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

This topic is 4102 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this