Question 1 : what are constructors ? Discuss their types



Download 53.48 Kb.
Page1/2
Date30.08.2021
Size53.48 Kb.
#57251
  1   2
CPP
CPP

Question 1 : what are constructors ? Discuss their types
A constructor is a special type of member function of a class which initializes objects of a class. In C++, Constructor is automatically called when object(instance of class) create. It is special member function of the class because it does not have any return type.
How constructors are different from a normal member function?

A constructor is different from normal functions in following ways: 


  1   2




The database is protected by copyright ©ininet.org 2024
send message

    Main page