Access | public | protected | private |
---|---|---|---|
the same class | yes | yes | yes |
derived class public inheritance | yes still public | yes still protected | no still private |
derived class protected inheritance | yes change to protected | yes still protected | no still private |
derived class private inheritance | yes change to private | yes change to private | no still private |
friend | yes | yes | yes |
other | yes | no | no |
References:
C++ Tutorial
Related Posts:
Friend Functions and Classes
No comments:
Post a Comment