Professional Documents
Culture Documents
Oop Final Notes
Oop Final Notes
FUNCTION OVERRIDING :
The base class function must be declared as virtual in order for it to be overridden. If a
function is not declared as virtual in the base class, the derived class cannot override it.
FRIEND FUNCTION :
• The concepts of encapsulation and data hiding dictate that
nonmember functions should not be able to access an
object’s private or protected data
• Friend function of a class
Not a member function
Has direct access to private members
Just as member functions do
FRIEND CLASSES :
OPERATOR OVERLOADING :
Operator overloading means comparing, performing different
arithmetic operation on more than one objects of class