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//

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles:

About

DevX is the leading provider of technical information, tools, and services for professionals developing corporate applications. 

Subscribe

Get exclusive access to the best technical information, tools, and services sent straight to your inbox.  

©2023 Copyright DevX - All Rights Reserved. Registration or use of this site constitutes acceptance of our Terms of Service and Privacy Policy.