Explicit Specialization of Generic Class





This video tutorial explains the explicit specialization of generic class i.e overriding the generic class for a specific version of it in c++ programming.
You are gonna learn what happens when we do explicit specialization on a generic class, how to define a class for a datatype which will override the generic class for that datatype, what is the syntax to denote explicit specialization of a class in detail with example.

source code for this tutorial

#include 

using namespace std;

template  class MyClass{
Type p1;
public:
    MyClass(Type p){
        cout << "from the generic class conbstructor"< class MyClass {
int p1;
public:
    MyClass(int p){
    p1 = p;
     cout << "from the specific integer version class conbstructor"< ob1("anil");
    MyClass  ob2(22);
    ob1.whatYouGot();
    ob2.whatYouGot();
    return 0;
}

 
Back To Top