前言:
一個(gè)變量在聲明中通過(guò)另一個(gè)對(duì)象進(jìn)行賦值
- Person q("Mickey"); // constructor is used to build q
- Person r(q); // copy constructor is used to build r
- Person p = q; // copy constructor is used to initialize in declaration
- P = q; // assignment operator, no constructor or copy constructor
- 函數(shù)參數(shù)傳遞中
- 函數(shù)返回一個(gè)對(duì)象時(shí)
具體內(nèi)容:
1. 關(guān)于auto_ptr解析
2. auto_ptr_ref