#include "iostream"
using namespace std;
class A
{
public:
A (int uu,float pp){ a=uu;b=pp;}
A(A & i){cout<<"aaaaaaaaaaaaaaa"<<endl;}
int a;
float b;
};
A ss()
{
A w(5,6.6);
return w;
}
void main()
{
A & u =ss();
cout<<u.a <<endl;
cout<<u.b <<endl;
}
而且数值没复制成功,如果采用默认复制构造函数就可以正确复制