Re: "Will be initialized after": does it matter?
Re: "Will be initialized after": does it matter?
- Subject: Re: "Will be initialized after": does it matter?
- From: Chris Espinosa <email@hidden>
- Date: Tue, 12 Dec 2006 13:48:12 -0800
On Dec 12, 2006, at 1:39 PM, Mark Wagner wrote: I'm getting the following warning when compiling my project:
MBOOK.H: In constructor 'MBook::MBook(id, tag, id)': MBOOK.H:201: warning: 'MBook::ostrQuestionTypeHeaderVOD' will be initialized after MBOOK.H:190: warning: 'MString MBook::oAbbrev' MBOOK.CPP:112: warning: when initialized here
What does it mean, and does it matter?
The order of initialization is determined by the order of the data members within the class, not the order of initializers in the constructor. Therefore, if you give a different order in the constructor, the compiler is warning you that it will not respect that ordering. To eliminate the warning, make the initializer list match the data member ordering.
Chris |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden