devxlogo

Use Explicit Access Specifiers

Use Explicit Access Specifiers

C++ provides default access specifiers when you don’t use spell them out explicitly, as in the following examples:

 struct Employee{ /*..*/};class Manager : Employee //implicit public inheritance{  int rank; //implicitly private  bool StockHolder; //implicitly private//

devx-admin

Share the Post: