Question on inheritence and constructor definition

Can scope resolution operator and inheritence be used simultaneously in a line? Like, derived_class_name::derived_constructor():base_constructor() { } . What happens if such a thing is defined?
Yes, this is the definition of the derived_constructor of derived_class_name class, calling base_constructor as initializer list.

Scope resolution and inheritance are independent concepts.
Scope resolution is used to specify which class/namespace's method/object you are using when there are more than one with the same name.
Last edited on
Topic archived. No new replies allowed.