关于调用私用的问题
jibee 2008-04-08 08:40:15 Complex Complex::operand+( const Complex &operand2 ) const
{
return Complex( real + operand2.real,
imaginary + operand2.imaginary );
}
Complex 是定义的一个类,real和 imaginary是它的私有成员,Complex (double ,double)是construtor,为什么这类函数Complex(double,double)
可以直接调用operand2的私有成员operand2.real?