Constructer is a special type of member function having same name as that of it's class and gets called upon creation of an object inorder to construct it and initialize it if required...... It doesn't take any argument .Not even void.............By simply declaring an object the default constructer of the associated class gets called..........Or by passing parameter explicitely during object declaration
a constructor is a function with the same name of class in which it is defined. It doesn't have any return type and used to intialize the objects of class.
No comments:
Post a Comment