** Reworded to make more sense
i have 3 classes and i want instances of these classes to be able to interact with each other, not by having a controller object. The problem i'm having is they're not defined in each others .h files and i don't know how to do that properly. Below is some code to explain;
game.cpp:
#include "game.h"
#include "Class - cEntity.h"
#include "Class - cGUI.h"
cGui *gui;
vector<cEntity*> entities;
Class - cEntity.h:
#include "game.h"
#include "Class - cGui.h"
extern cGui *gui;
class cEntity{
...
};
I compile the code that uses this structure, and i get 2 errors;
Error 7 error C2143: syntax error : missing ';' before '*' c:\dropbox\of_v0.8.0_vs_release\apps\myapps\zombierts\src\entities.h 10
Error 8 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\dropbox\of_v0.8.0_vs_release\apps\myapps\zombierts\src\entities.h 10
Can anyone help clarify where i'm going wrong?
Thanks