Hi, compiler throwing up the error:
error C2504: 'CEntityTemplate' : base class undefined
This is the code that is producing the error:
#pragma once
#include "Defines.h"
#include "Entity.h"
#include "ShaderManager.h"
class CTankTemplate : public CEntityTemplate
{
public:
CTankTemplate( const string& Type, const string& Name, const string& Filename, //These 2 lines get the rendering
ERenderMethod RenderMethod, CShaderManager* shaderManager, //and mesh info.
float MaxSpeed, float Acceleration, float TurnSpeed, //These set the variables for driving mechanics
int Weight, int MaxHealth, LPDIRECT3DDEVICE9 d3dDevice );
...and also later on in the header...
class CTankEntity : public CEntity
{
public:
CTankEntity( CEntityTemplate* Template, string Name,
float posX=0.0f, float posY=0.0f, float posZ=0.0f,
float rotX=0.0f, float rotY=0.0f, float rotZ=0.0f,
float scaleX=1.0f, float scaleY=1.0f, float scaleZ=1.0f );
As you can see I have included the header "Entity.h" and this is where both base classes are defined!
I have tried using forward declaration at the top of the file, but this just throws up the same error.
Even stranger is if I define the base classes at the tope of the file like so...
class CEntity{};
class CEntityTemplate{};
...it then throws up an error saying CEntity and CEntityTemplate have been already been defined and sends you to the .cpp file with the definitions of the two classes in!!
Any help would be appreciated.