Board logo

標題: C++ output stream 問題 [打印本頁]

作者: ghostkcleung    時間: 2023-4-16 00:43     標題: C++ output stream 問題

Java 裡面,有個 abstract class 叫做 OutputStream,
只要我 implement write( ) method 落去,
佢就會識行晒其他 method 。

C++ 有無類似啲咁嘅嘢?
作者: KinChungE    時間: 2023-4-16 15:06

iostream既"ostream"已經係
分別係唔會寫write() function, 而係override "<<" (output) 同">>"(input) operator





歡迎光臨 電腦領域 HKEPC Hardware (https://h0.hkepc.com/forum/) Powered by Discuz! 7.2