Item 22: Declare data members private(Effective C++)
摘要:
Declare data members private. It gives clients syntactically uniform access to data, affords fine-grained access control, allows invariants to be enforced, and offers class authors implementation flexibility. protected is no more encapsulated than public. 阅读全文
posted @ 2011-03-27 20:56 Ray Z 阅读(181) 评论(0) 推荐(0) 编辑