020_拷貝構造函數的四種調用時機

/* copy構造函數的調用 時機1 時機2 */ #if 1 class Test4 { public: Test4() //無參數構造函數 { m_a = 0; m_b = 0; cout << "我是構造函數,自動被調用了" << endl; } Test4(int a) { m_a = a; m_b = 0; } Test4(int a, in
相關文章
相關標籤/搜索