你可能感兴趣的试题
operator+(objl, obj2) +(obj1, obj2) obj2.operator+(obj1) obj1,operator(obj2)
ptr->a=100; ptr=&obj2; ptr++; obj2=*ptr;
obj1.listen(); obj1.speak(); obj2.listen(); obj2.speak();
operator+(obj1,obj2) +(obj1,obj2) obj2.operator+(obj1) obj1.operator+(obj2)
operator>(obj1,obj2) >(obj1,obj2) obj2.operator>(obj1) obj1.operator>(obj2)
ptr->a=100; ptr=&obj2; ptr++; obj2=*ptr;
ptr->a=100; ptr=&obj2; ptr++; obj2=*ptr;
ptr->a=100; ptr=&obj2; ptr++; obj2=*ptr;
在obj2中的实例变量被赋予obj1中相同的值 obj2和obj1被认为是同一个变量 obj2的值赋给了obj1,而obj2为空 以上都不对