Hello.
I'm trying to wrap up some code for a map editor SDK I'm using, I havn't got it confirmed that this is useful, but still I thought I'd make it for the experience and if it's useful
Anyways, I'm using a template and I'm not used to templates yet :S still I found no other way to do it...
I've also been trying unlimited different ways to do this, this is what I'm currently at...
Code:
template<typename A_Type> class CEntity : hgeEntity {
private:
hgeEntityLayers layer;
bool m_static;
A_Type m_class;
public:
CEntity(const hgeEntityLayers layer_, bool static_, CEntity class_) : hgeEntity(layer_, static_) { layer = layer_; m_static = static_; m_class = class_; }
CEntity* Spawn() { return new CEntity(layer, m_static,m_class); }
virtual void Initialize(){}
};
And the error:
Code:
error C2955: 'CEntity' : use of class template requires template argument list
And this is where I try to call the constructor...
Code:
CCharacter::CCharacter(hgeResourceManager resource_): CEntity(HEL_MIDDLE2, false, CCharacter(resource_))
Thanks in advance!