?????????
????1?????????????C?????????????????????????????????????????
????2??????????C?????????????????????????????????????????????
????3??????????????C??????????????????????&????????????о??????????????????
??????????????????????????????????????????ɡ?
????????????????
?????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????????????
class Cat
{
public:
Cat()
{
cout<<"Cat?? ??ι?????"<<endl;
}
Cat(Cat& obj)
{
cout<<"Cat?? ??????????"<<endl;
}
~Cat()
{
cout<<"Cat?? ???????? "<<endl;
}
};
void playStage()
//???????????????????????
{
Cat();
/*????д?????????????ι??????????????????Cat????????????д???
???????н???????????????????????????????*/
Cat cc = Cat();
/*????д?????????????ι??????????????????Cat????????????????
????cc??????????????????????б???????*/
cout<<"cc ???????б?????"<<endl;
}
int main()
{
playStage();
system("pause");
return 0;
}
?????????
????Cat?? ??ι?????
????Cat?? ????????
????Cat?? ??ι?????
????cc ???????б?????
????Cat?? ????????
?????????
????1???????playStage( )?????е?Cat( )?????????????????????????Cat( )???????????????????????????????????????????
????2???????playStage( )??????Cat cc = Cat();???????????????????????????????cc??????????????????????????????????cc??????????????????cc??????????????
???????
?????????????????????????ж???????????????????????????????????????????????????????????????????????????????ж??????????????????????????????????????????????
???????????????а??????????????????????????????????лл????