CodePudding user response:
Pulic and private: ://the colon here is writing c + + attributeExamInfo constructor with behind is for the member variable assignment, this assignment with high efficiency
CodePudding user response:
This list is initialized after the colon, in which general initialize the parent class and object members (members of the class is a class object);If put it in the body of the function of initialization, is that the assignment operation (erase + copy), for member variables into function devices will be a default initialization, call them the default constructor, if initialization is equivalent to in the function body conducted two initialization, it is cost performance; The specific terms refer to the effective c + + 04 to determine the object being has to be initialized before use