问题及代码
ALL rights reserved.
*文件名称: 初学对象6
作者:李长鸿
*完成时间:2015.4.15
*问题描述: 阅读程序
*/
#include <iostream>
using namespace std;
class B
{
public:
B()
{
cout<<"default constructor"<<endl;
}
~B()
{
cout<<"destructed"<<endl;
}
B(int i):data(i)
{
cout<<"constructed: " << data <<endl;
}
private:
int data;
};
B Play(B b)
{
return b ;
}
int main()
{
B temp = Play(5);
return 0;
}
总结:一头雾水。。。。。。