如果我需要為屬性編寫setter和/或getter,則可以這樣編寫: struct X { /*...*/}; class Foo { private: X x_; public: void set_x(X value) { x_ ...
確定! 回上一頁