第3周 專案0 閱讀程式

2021-06-29 09:40:43 字數 777 閱讀 7160

——————————————————問題及**1:

#include using namespace std;

class a

~a()

};class b

~b()

};int main()

執行結果:

——————————————————問題及**3:

知識點總結:

帶引數建構函式。

預設建構函式。

有預設引數的建構函式。

引數初始化表。

析構函式。

學習心得:

最後乙個析構函式在沒執行的時候我自己估測錯了,後來看了執行結果想了想就想通了。

第1周 專案0 閱讀程式1

問題及 檔名稱 score.cpp 作 者 單昕昕 完成日期 2015年3月14日 版 本 號 v1.0 程式輸入 無。程式輸出 無。include include using namespace std class student void display cout 執行結果 知識點總結 程式中定...

第4周專案1 閱讀程式(3)

檔名稱 project.cpp 完成日期 2015年4月5日 版本號 v1.0 問題描述 閱讀程式 輸入描述 略。程式輸出 略。includeusing namespace std class myclass myclass static int number int myclass number ...

第12周專案1 閱讀程式(4)

檔名稱 test.cpp 5 作 者 劉暢 完成日期 2014 年 11 月 15 日 版 本 號 v1.0 8.9.問題描述 理解函式的預設引數 輸入描述 啥也不用輸 程式輸出 include using namespace std const double pi 3.1415926 float ...