65,211
社区成员
发帖
与我相关
我的任务
分享
// A& operator = (const A&)
A& operator = (const A& src)
class A
{
private:
char* ch;
public:
A()
{
ch = new char[10];
}
A(const A& src)
{
ch = new char[10];
memcpy(ch, src.ch, 10);
}
A& operator = (const A&)
{
memcpy(ch, src.ch, 10);
}
};