struct中的class在复制时指向堆中的同一个对象。
struct out
{
class in a;
}
out o1 = new out();
out o2 = o1;
o2.a与o1.a指向同一个对象。
转载于:https://blog.51cto.com/crwonclown/559791
struct中的class在复制时指向堆中的同一个对象。
struct out
{
class in a;
}
out o1 = new out();
out o2 = o1;
o2.a与o1.a指向同一个对象。
转载于:https://blog.51cto.com/crwonclown/559791