because CArray requires its element type to be copyable, i should define “copy constructor” and “assignment operator” functions for "ArrClass" class.
class ArrClass : public CArray<int,>
{
public:
int m_id;
ArrClass(){};
ArrClass(const ArrClass& obj){m_id = obj.m_id;};
void Func1(){ m_id = 1;};
ArrClass operator=(const ArrClass& obj)
{
m_id = obj.m_id;
return *this;
};
};
the error resolved.