類別中的const 的成員函數不能修改資料變數的值,但可修改宣告為mutable 的成員變數,舉例如下 #include <iostream> class Demo { public: Demo(int pa) { a = pa; } ...
確定! 回上一頁