討論串[問題] 程式看不懂 請幫幫我><
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓2(2推 0噓 1→)留言3則,0人參與, 最新作者loveme00835 (高髮箍)時間14年前 (2012/01/22 21:15), 編輯資訊
0
0
0
內容預覽:
如果 print_time 是 non-static member function, 那麼要印出資訊. 在你 test.print_time 下去的時候就可以決定好了(透過this存取),. 不必為了印自己的資訊還要再多個參數來傳. const Time & t ←─→ Time const &
(還有835個字)

推噓0(0推 0噓 1→)留言1則,0人參與, 最新作者WJAider (Aider)時間14年前 (2012/01/22 18:24), 編輯資訊
0
0
0
內容預覽:
耶,這就要講到參數列四大型態了. 以原文為範例,print_time 要傳入一個 Time 物件的話有四種傳法:. 1. void Time::print_time( Time t ) //copy 版. 2. void Time::print_time( const Time t ) //cons
(還有986個字)

推噓1(1推 0噓 7→)留言8則,0人參與, 最新作者abcxxxx (撐過就是神)時間14年前 (2012/01/22 16:17), 編輯資訊
0
0
0
內容預覽:
開發平台(Platform): (Ex: VC++, GCC, Linux, ...). dev c++. 程式碼(Code):(請善用置底文網頁, 記得排版). void Time::print_time( const Time &t ). .. .. .. int main(). {. Time
(還有14個字)
首頁
上一頁
1
下一頁
尾頁