c++ - Default inheritance access specifier -


if have example 2 classes a , b, such class b inherits a follows:

class b: public a

in case, i'm doing public inheritance.

if write previous code follows:

class b: a

what type of inheritance doing here (i.e; public)? in other words, default access specifier?

just side question here. call previous line of codes statements? remember read in c++ without fear: beginner's guide makes feel smart book statements that end ;. think that?

thanks.

just small addition existing answers: default type of inheritance depends on inheriting type (b), not on 1 being inherited (a). example:

class {}; struct b: /* public */ {};  struct {}; class b: /* private */ {}; 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -