Re: C string constant->NSString constant without defining twice?
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