- 1
What is use of constructor in c++
2 Answers
+ 7
Constructor is a enhanced features of cpp .we cannot explain in few words if you want to see example you can search on Google about constructor u will understood much better.
+ 6
Constructor is a special member function of a class which is used to initialize the object of the class.
You can check more info from here đ
https://www-geeksforgeeks-org.cdn.ampproject.org/v/s/www.geeksforgeeks.org/constructors-c/amp/?amp_js_v=a2&_gsa=1&usqp=mq331AQFKAGwASA%3D#aoh=16010226624021&referrer=https%3A%2F%2Fwww.google.com&_tf=From%20%251%24s&share=https%3A%2F%2Fwww.geeksforgeeks.org%2Fconstructors-c%2F