示例#1
0
int main(){
	int w,h;
	CRectangle r;
	cin>>w>>h;
	r.Init(w,h);
	r.w=7;
	printArea(r);
	cout<<"f**k"<<r.Area()<<endl;
	Complex c1;
	c1.real=1;c1.imag=2;
	Complex c2(c1);
	cout<<c2.real<<endl;
	
	return 0;
}
示例#2
0
void printArea(CRectangle& r){
	r.w=9;//引用与直接调用的区别
	cout<<r.Area()<<endl;

}