0

constructor c++

Could someone please explain me (in an easy way with an example) what the task of a constructor during a class is? I don't get it. I'd be very thankful! Thanks in advance!

5th Jan 2017, 6:15 PM
John
John - avatar
1 Antwort
+ 6
A constructor of a class is a function/method triggered when an object is created under that class. (see examples of sololearn tutorials)
5th Jan 2017, 6:23 PM
Valen.H. ~
Valen.H. ~ - avatar