討論串[語法] 請教一題有關ctor/dtor的問題
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓2(2推 0噓 1→)留言3則,0人參與, 最新作者loveflames (咕啾咕啾魔法陣)時間15年前 (2010/11/14 23:34), 編輯資訊
0
0
0
內容預覽:
如果沒規定一定得用ctor/dtor. 可以像下面這樣做. #include <iostream>. int main(). {. std::cout<<"hello\n";. return 0;. }. void bye(). {. std::cout<<"Destructor xxxx\n";.
(還有77個字)

推噓5(5推 0噓 4→)留言9則,0人參與, 最新作者Crysis (Crysis)時間15年前 (2010/11/14 23:24), 編輯資訊
0
0
0
內容預覽:
#include <iostream>. int main(). {. std::cout<<"hello\n";. return 0;. }. 題目是要求不動到main()的情況下. 讓輸出變成. Constructor xxxx //xxxx的字樣我忘記了, 整句是執行ctor的意思. hell
首頁
上一頁
1
下一頁
尾頁