'operator =' function is unavailable in 'class'
No assignment (=) operator is defined for the class. If you define any assignment operator that takes the class as a parameter, the compiler cannot generate a default assignment operator for that class.
Assignment operators are not inherited by derived classes. You must explicitly define an assignment operator for each class.
The following sample generates C2582:
class A { private: A& operator=(const A& a){} }; class B : public A { public: // try the following line to resolve the error // void operator=(const B& b){} }; void main() { B b1; B b2; b1 = b2; // C2582 }