Computer Science, asked by meeashu1279, 1 year ago

What is constructors and use of constructors in c++?

Answers

Answered by Shashwat8099
6
Constructors are special class functions which performs initialization of every object. The Compiler calls the Constructor whenever an object is created. Constructors initialize values to object members after storage is allocated to the object.
Answered by Anonymous
1

Hey !

A member function having the same name as its class and that initializes class objects with legal initial values.

Similar questions