首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > C/C++/VC++ > 在一个班,C++使用三关键词设置访问界限:公共、私人…

在一个班,C++使用三关键词设置访问界限:公共、私人…

资 源 简 介

 在一个类中,C++用三个关键词设置访问界限:public, private和protected。它们决定了跟在他们后面的标识符的被使用情况:public意味着其后的标识符可以被用户定义的其实例引用 而private则说明其后的标识符除了类的成员函数之外,用户定义的其实例不能引用 protected为类的继承提供了接口,同时保护其不被外界访问。-In a class, C++ using the three keywords set to visit boundaries: public, private and protected. They decided to follow behind in their use of the identifier: public means the following can be user-defined identifier of the examples cited and private identifier is illustrated in the following categories of members in addition to function, the user the definition of its instances can not be invoked protected to provide the type of interface inheritance, at the same time not to be outside the protection of their visit.

文 件 列 表

cdaima2.doc
VIP VIP
0.212366s