• 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 string constant->NSString constant without defining twice?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C string constant->NSString constant without defining twice?


  • Subject: Re: C string constant->NSString constant without defining twice?
  • From: Erg Consultant <email@hidden>
  • Date: Tue, 28 Apr 2009 13:53:26 -0700 (PDT)

I tried this and it absolutely works great - although I too had thought that it wouldn't.

Who woulda thunkit?

Erg




________________________________
From: Erik Buck <email@hidden>
To: email@hidden
Sent: Tuesday, April 28, 2009 8:18:56 AM
Subject: Re: C string constant->NSString constant without defining twice?

I haven't tried, but I don't think the following works because of the way the pre-processor inserts spaces:
#define kConstCString "This is a const c string"
#define kConstNSString @kConstCString


Don't hard code paths!  Use NSHomeDirectory() or NSTemporaryDirectory() or
NSSearchPathForDirectoriesInDomains().
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: C string constant->NSString constant without defining twice? (From: Erik Buck <email@hidden>)

  • Prev by Date: [OT] Re: Need guidance on data structure
  • Next by Date: Re: Storing a table view in user defaults
  • Previous by thread: Re: C string constant->NSString constant without defining twice?
  • Next by thread: Key Value Coding is not case-sensitive?
  • Index(es):
    • Date
    • Thread