• 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: C++ warnings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ warnings


  • Subject: Re: C++ warnings
  • From: Andrew White <email@hidden>
  • Date: Thu, 14 Apr 2005 16:54:22 +1000


Justin Walker wrote:

MSymbols:MSymbols (const Character & p1, int p2, bool p3)
    : chi (p1), k(p2), do_save (p3)


Ayup...that seems to be it.

As noted in my original post, I have this:

Could it have to do with this (appearing first in the class definition)?
    MSymbols (const Character& chi, int k=2, bool save=false) ;


The "obvious" fix isn't (I gather default values can be given only at the end of an arg list), so I reversed the order of declaration in the class. Piece of cake.

AFAIK, it's not the declaration that's doing it, it's the definition.

Changing the definiton to...

MSymbols::MSymbols (const Character & p1, int p2, bool p3)
     : k(p2), chi (p1), do_save (p3)
       // Note - order in initialiser list now matches order in class
       // Order of arguments doesn't matter

should also fix the problem.

--
Andrew White

--------------------------------------------------------------------------
This email and any attachments may be confidential. They may contain legally
privileged information or copyright material. You should not read, copy,
use or disclose them without authorisation. If you are not an intended
recipient, please contact us at once by return email and then delete both
messages. We do not accept liability in connection with computer virus,
data corruption, delay, interruption, unauthorised access or unauthorised
amendment. This notice should not be removed.
_______________________________________________
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: 
 >C++ warnings (From: Justin Walker <email@hidden>)
 >Re: C++ warnings (From: Andrew White <email@hidden>)
 >Re: C++ warnings (From: Justin Walker <email@hidden>)

  • Prev by Date: Re: C++ warnings
  • Next by Date: Where does "version" come from?
  • Previous by thread: Re: C++ warnings
  • Next by thread: Re: C++ warnings
  • Index(es):
    • Date
    • Thread