How to inherit template class.
I am getting some sort of error which I can not understand.How to rectify this?
// How to inherit a template class
#include<iostream>
using namespace std;
template <class T, class V>
class Mother
{
public:
void add(T x, V y)
{
std::cout << " ADD= " << x+y << std::endl;
}
};
class child:public Mother <class T, class V>
{};
int main()
{
child <int, int> c;
c.add(10,20);
return 0;
}