Example & Tutorial understanding programming in easy ways.

What is super keyword in C++?

Super is a keyword. It is used inside a sub-class method definition to call a method defined in the super class. Private methods of the super-class cannot be called. Only public and protected methods can be called by the super keyword. It is also used by class constructors to invoke constructors of its parent class.
C++ doesn't have a super or base keyword to designate "the base class", like C# and Java do. One reason for this is that C++ supports multiple inheritance, which would make such a keyword ambiguous




Read More →