Quote:HasEffect
is a member function. You cannot assign to that.
Also, as a matter of style:
Effect::Effect( const char * realname, const char *effectname) : Resource< Effect >( realname, effectname ) {}template < class T >class Resource {public: bool HasEffect() const { return effectName != NULL; }private: const char * effectname;};
No need to state same information twice. If effectname is NULL, Resource does not have an effect. So effectname is sufficient criteria, and also justifies the use of getter function.
And if you do need to use string literals, make sure to pass them as const char *, as to avoid the memory management issues with dynamic allocations.