• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: "Will be initialized after": does it matter?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >"Will be initialized after": does it matter? (From: "Mark Wagner" <email@hidden>)

  • Prev by Date: Re: "Will be initialized after": does it matter?
  • Next by Date: Searching my headers
  • Previous by thread: Re: "Will be initialized after": does it matter?
  • Next by thread: Searching my headers
  • Index(es):
    • Date
    • Thread