If we find the difference between Classes and Structures in C++,
1) Classes are inherited as private by default, structures are inherited as publicly.
2) Classes members are private by, structures members are public as default
1) Classes are inherited as private by default, structures are inherited as publicly.
2) Classes members are private by, structures members are public as default
Classes | Structures |
Members are Private | Members are Public |
Inherited Privately | Inherited Publically |
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.