I was wondering if someone could explain initialization lists for structs and class member functions. I don't see why you would initialization in the initializer list instead of in the body of the program. For example:
I am guessing there's a good reason but I really don't understand the point.Code:StudentType::StudentType() : Grades(10, -1), Gender(female), Class(0) { }
Thank you so much for any help![]()




Reply With Quote