Programming with Passion

Make the best out of everything.

Saturday, 26 March 2016

You can declare a derived class from a base class with different access control,

You can declare a derived class from a base class with different access control, i.e., public inheritance, protected inheritance or private inheritance.
class base
{
.... ... ....
};

class derived : access_specifier base
{
.... ... ....
};

/* Note: Either keyword public, protected or private is used in place of access_specifier. */

No comments:

Post a Comment