Having trouble inheriting from a template class.
Looks something like this:
template<typename type>
class base {
protect:
...
public
...
virtual bool func1(type var1);
};
// this class is not templated but derives from template class, don’t know if its issue
class derived : public base<type_spec_1> {
protected:
...
public:
...
bool func1(type_spec_1);// function I wish to override;
};
// In the .cpp, I try to scope the function, it compiles but it does not link
bool derived::func1(type_spec_1 type){ return false; };
The linker gives me an error in this format: LNK2001, unresolved symbol base::func1(type_spec_1);
Like it does not see that "derived"==base"<type_type_1>"
How can I provide the proper syntax for this, if it is even possible????
Don’t you need to do something like this?
Because
class derived : public base<type_spec_1>saysderivedis derved from a typebase<type_spec_1>, but the type definition ofbase<type_spec_1>is not completely implemented yet?