Lecture 5
Lecture 5
Programming
Lecture 5
Class & Object (Part 2)
1
Object as Function Argument:
Procedure to Pass
Object to Function
In C++ programming,
objects can be passed
to function in similar
way as variables and
structures.
Object asReturning
Function Argument:
Object from Function
Returning Object
from Function
It is a member function whose name is the same as the class name but
is preceded by tilde (~) symbol.
A class can’t have more than one destructor. It takes no arguments and
no return types can be specified for it (not even void).