主题:本人为初学者,求解惑。我不理解程序中B f(B b) 是什么意思
	
#include<iostream.h>
class B
{
public:
B() {cout<<"default constructor"<<endl;}
~B() {cout<<"destructed"<<endl;}
B(int i):data(i) {cout<<"coustructed parameter"<<data<<endl;}
private:
int data;
};
B f(B b){return b;}
int main()
{
B t1=f(5);
B t2=f(t1);
return 0;
}
	
	

 您所在位置:
 您所在位置: