Re: Method In Templated Super/Parent Called From Templated Derived/Child
"VirGin" <virgin69@gmail.com> wrote in message
news:1192643588.793533.122500@t8g2000prg.googlegro ups.com
> Using the above format, I want to call TheParentClass::TheMethod from
> within TheKid::TheMethod.
TheParentClass is the class template (i.e. not actually a class, but a
template for one), and as you hinted at earlier you need to use the template
class. So you should use:
TheParentClass<TheKid>::TheMethod();
> BTW, the way I did it the first time generated a 'requires template
> argument list' error
This is because to call a method you need to call it on a template class,
not a class template and to go from a class template to a template class you
need to provide an argument list (<TheKid> in this case).
|