CONSTRUCTOR is a special member function to any class...it is used such that the object is initialized at the same time it is called...although is a member function it doesn't have any body....it takes arguments but not objects...but it takes reference of objects as arguments....it's main purpose is, as said initialization of objects...There are two types : 1) PARAMATERIZED 2) DEFAULT ....if we does not provide constructor compiler provides the default constructor....and if we provide it is parametarized...it must be under public section of the class...
No comments:
Post a Comment