class Test{
public:
int a;
Test(){
a = ;
}
}; int main1()
{
Test* t1 = new Test();
t1->a = ; Test* t2 = new Test();
t2->a = ; t2 = t1; //t2原始值丢失,和t1指向同一个地方了, t1->a = ;//t2->a也变成了111,因为指向同一个地方了
t2->a = ;//t1->a也变成了,因为指向同一个地方了
}
int main2()
{
Test t1;
t1.a = ; Test t2;
t2.a = ; t2 = t1; //t1 t2 的a想等,把t1复制了一份 t1.a = ; //不影响t2的值
t2.a = ; //不影响t1的值
}