What does “operator = must be a non-static member” mean?
问题 I\'m in the process of creating a double-linked list, and have overloaded the operator= to make on list equal another: template<class T> void operator=(const list<T>& lst) { clear(); copy(lst); return; } but I get this error when I try to compile: container_def.h(74) : error C2801: \'operator =\' must be a non-static member Also, if it helps, line 74 is the last line of the definition, with the \"}\". 回答1: Exactly what it says: operator overloads must be member functions. (declared inside the