struct中的class在复制时指向堆中的同一个对象。

struct out

{

class in a;

}

out o1 = new out();

out o2 = o1;

o2.a与o1.a指向同一个对象。