|
Your are facing a classic C++ problem.
Replace following function declaration:
friend ostream& operator << (ostream&,const Derived<T>&);
to
friend ostream& operator << <> (ostream&,const Derived<T>&);
and also replace
friend istream& operator >> (istream&,Derived<T>&);
to
friend istream& operator >> <>(istream&,Derived<T>&);
Note: Only make change in function declaration and not in function definition.
The problem is that you need to tell the compiler that the declared friend function is a template.
Let me know if this works or if you face any problem.
|