I'm taking the C++ course in the university.
The following code was taken from an exam question.
Please help me to understand why the code doesn't compiles?
#include <iostream>
using namespace std;
template <class T>
class A
{
T t;
public:
A(T p) : t(p) {}
const A<T>& operator= (const A<T>& val)
{
t = val.t;
return *this;
}
};
template <class T>
class Son : public A<T>
{
public:
Son (T p):A<T>(p) {}
};