Home > Back-end >  The base class is a template, a subclass inherits the base class template, how to instantiate?
The base class is a template, a subclass inherits the base class template, how to instantiate?

Time:01-19

Template
Class A
{
Private:
Type a;
}

How to declare a subclass inherits the base class template, then use?

CodePudding user response:

Class B: public A;

Template
Class B: publice A
.

CodePudding user response:

1) B B1.
2) B b1;
  • Related