ok, so here's my header file (or at least part of it):
template<class T>
class List
{
public:
.
:
List& operator= (const List& other);
.
:
private:
.
:
};
and here is my .cc file:
template <class T>
List& List<T>::operator= (const List& other)
{
if(this != &other)
{
List_Node * n = List::copy(other.head_);
delete [] head_;
head_ = n;
}
return *this;
}
on the line List& List<T>::operator= (const List& other)
I get the compilation error "Expected constructor, destructor, or type conversion before '&' token". What am I doing wrong here?