Because the synthesised default constructor will be called when an object of class PersonInfo
is created, which will default initialized its data members. Meanwhile, both string
and vector
have default constructors, and will be used when default initialized. Thus, we don't need in-class initializers to initialze data members in PersonInfo
.