EEN 103 Programming in C++
EEN 103 Programming in C++
PROGRAMMING IN C++
• Default Constructors
• Parameterized Constructors
• Copy Constructors
• A constructor is a special member function whose
task is to initialize the objects of its class. This is
known as automatic initialization of objects.
With constructor
CRectangle small_rect (4,6);
CRectangle big_rect(7,5);
• Constructors can not be called explicitly as if
they were regular member functions.