Constructor C++

Constructor C++

                        Constructor is used to initailize the data members automatically.A constructor is a member function of class.It execute when object of that class created.It means that when object of class created the constructor executes automatically.By default there is constructor even if you dont write it.


 Constructor Syntax 

                         The syntax of constructor is like same name of class e.g if the name of class is A so the constuctor will start with A(){ here is the body }.


Copy Constructor C++

                   Just read about copy constructor and assignment operator they can create a big problem in real world projects they cannot be used but for you should have some knowledge about it.

Constructor C++

Comments

Popular posts from this blog

Friend Function in C++

Data Member and Static Keyword in C++

Use Of CPP