C++ inheritance type [duplicate]
Possible Duplicate:
Default inheritance access specifie开发者_开发技巧r
When class A
inherits from class B
:
class A: B {...}
Since I didn't specify the type of inheritance, What will the type of inheritance be? Will it be private
since it is the default? Or, is there some sort of dependency here? In other words, will the inheritance type depend on the inherited
class or the inheriting
class?
Thanks.
If you don't specify anything, it will be private
by default for classes. For structs it will be public
by default.
精彩评论