When I want to define a method declared in a template class, but that the method doesn\'t depend on the template parameters, have I to define it in the include files as :>
You'll need to define your method like this:
template class
void MyClass::myMethod()
{
// Method Body
}
The reason for this is that the method actually is dependent on the template parameter. Remember that every method has access to the special variable this; during the method call this is actually a parameter passed to the method. this changes in type depending on the template parameter specified during object instantiation and, as such, all methods must be template methods in order to accommodate all forms of this.