when i run my code, i get lots of undefined class errors, even though i have defined and included the files properly(i think).
here are the errors i'm getting:
------ Build started: Project: engine, Configuration: Debug Win32 ------
Compiling...
baseentity.cpp
c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\globals.h(13) : error C2079: 'CGlobals::controller' uses undefined class 'CEntityController'
c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\baseentity.cpp(9) : error C2228: left of '.AddEntity' must have class/struct/union
type is 'int'
c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\baseentity.cpp(59) : warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\baseentity.cpp(60) : warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data
main.cpp
c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\globals.h(13) : error C2079: 'CGlobals::controller' uses undefined class 'CEntityController'
entitycontroller.cpp
c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\globals.h(13) : error C2079: 'CGlobals::controller' uses undefined class 'CEntityController'
c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\entitycontroller.cpp(7) : warning C4018: '<' : signed/unsigned mismatch
c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\entitycontroller.cpp(13) : warning C4018: '<' : signed/unsigned mismatch
c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\entitycontroller.cpp(19) : warning C4018: '<' : signed/unsigned mismatch
c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\entitycontroller.cpp(28) : warning C4018: '<' : signed/unsigned mismatch
c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\entitycontroller.cpp(45) : warning C4244: 'argument' : conversion from 'double' to 'clock_t', possible loss of data
c:\documents and settings\tom\my documents\visual studio 2008\projects\engine\engine\entitycontroller.cpp(46) : warning C4305: '+=' : truncation from 'double' to 'float'
Generating Code...
Build log was saved at "file://c:\Documents and Settings\tom\My Documents\Visual Studio 2008\Projects\engine\engine\Debug\BuildLog.htm"
engine - 4 error(s), 8 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
and this is the relevant code:
globals.h:
#ifndef GLOBALS_H
#define GLOBALS_H
#include "timer.h"
#include "id_manager.h"
class CEntityController;
struct CGlobals{
float curtime;
CTimer timer;
IDM id_manager;
CEntityController controller;
}*gpGlobals;
#endif //GLOBALS_H
entitycontroller.h:
#ifndef ENTITYCONTROLLER_H
#define ENTITYCONTROLLER_H
#include <vector>
#include "globals.h"
class CBase;
class CEntityController{
std::vector<CBase*> m_vEntities;
float m_fNextUpdateTime;
public:
void SpawnEntities( );
void ActivateEntities( );
void ThinkEntities( );
void DeleteEntities( );
void Start( );
void Loop( );
void End( );
void AddEntity( CBase *pEntity );
};
#endif //ENTITYCONTROLLER_H
any help would be appreciated