Study Notes (05): C ++ Language Basics video tutorial -3.1 constructor

Learning immediately: https://edu.csdn.net/course/play/474/5128?utm_source=blogtoedu

Constructors tips:

No need to call, automatically executed when creating objects

The name of the constructor must be the same name with the class

Constructor does not have any type, no value is returned

Initialization parameter table

Generally not added to the contents of the constructor initializes independent

In the member function input and output caution

Published 17 original articles · won praise 0 · Views 135

Guess you like

Origin blog.csdn.net/cangersuifeng/article/details/104768428