Oop Definitions
Oop Definitions
Constructor Overloading:
The process of declaring multiple constructors with the same name
but different parameters is known as constructor overloading. The
constructor with same name must differ in one of the following
ways:
Number of parameters
Type of parameters
Sequence of parameters
Default copy constructor:
A type of constructor that is used to initialize an object with another
object of the same type is known as Default copy constructor.
Syntax
Class-name object-name(parameter);
Or
Class-name object-name=parameter;
Destructors:
A type of member function that is automatically executed when an object
of that class is destroyed is known as destructors.
Syntax:
~class-name()
{
Destructor body
}
Static data member:
A type of data member that is shared among all object of class is known as
static data member. It is define in class with static keyword.