討論串[問題] 程式看不懂 請幫幫我><
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁
內容預覽:
如果 print_time 是 non-static member function, 那麼要印出資訊. 在你 test.print_time 下去的時候就可以決定好了(透過this存取),. 不必為了印自己的資訊還要再多個參數來傳. const Time & t ←─→ Time const &
(還有835個字)
內容預覽:
耶,這就要講到參數列四大型態了. 以原文為範例,print_time 要傳入一個 Time 物件的話有四種傳法:. 1. void Time::print_time( Time t ) //copy 版. 2. void Time::print_time( const Time t ) //cons
(還有986個字)
內容預覽:
開發平台(Platform): (Ex: VC++, GCC, Linux, ...). dev c++. 程式碼(Code):(請善用置底文網頁, 記得排版). void Time::print_time( const Time &t ). .. .. .. int main(). {. Time
(還有14個字)
首頁
上一頁
1
下一頁
尾頁