- You can declaer class members, whether they are data items or member functions, either in the public or the private section of a class.
- But because one of the main precepts of OOP is to hide the data, data items normally go into the private section. The member functions that constitute the class interface go into the public section; otherwise, you can't call those functions from a program.
Public and Private
最新推荐文章于 2019-09-15 22:36:06 发布