• 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: default parameters in procs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: default parameters in procs


  • Subject: Re: default parameters in procs
  • From: Chris Espinosa <email@hidden>
  • Date: Wed, 7 Dec 2005 13:43:23 -0800

On Dec 7, 2005, at 9:01 AM, Rob Crawford wrote:

I am using XCode 2.2.


sample code


typedef struct myStruct

{

pascal int (*foo)(double val1=0.0, double val2=1.0);

// more like the above.

} myStruct;


If the warning/error you are getting is "Default arguments are only permitted for function parameters," then this is an old C-ism that is no longer supported in C++ as of gcc 3.4.

You should probably move the initializers (=0.0, =1.0) to the function definition, or use straight C (not C++), or use gcc 3.3.

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: 
 >default parameters in procs (From: Rob Crawford <email@hidden>)
 >Re: default parameters in procs (From: Chris Espinosa <email@hidden>)
 >Re: default parameters in procs (From: Rob Crawford <email@hidden>)

  • Prev by Date: Re: Linking object codes
  • Next by Date: XCode 2.1 w/gcc 4.0 link error
  • Previous by thread: Re: default parameters in procs
  • Next by thread: uncaught exception
  • Index(es):
    • Date
    • Thread