Re: Bizzarre CFSTR behavior
Re: Bizzarre CFSTR behavior
- Subject: Re: Bizzarre CFSTR behavior
- From: "Clark Cox" <email@hidden>
- Date: Fri, 4 Jan 2008 08:38:04 -0800
On Jan 3, 2008 11:26 PM, Luigi Castelli <email@hidden> wrote:
> Hi there,
>
> I am on a Mac Powerbook Intel Core Duo.
> I am running MacOS 10.4.7 and Xcode 2.
>
> If I write:
>
> const char *kString = "hello";
> CFStringRef cfString = CFSTR(kString);
>
> Xcode doesn't compile the above code and gives me a parse error.
>
> but if I write:
>
> CFStringRef cfString = CFSTR("hello");
>
> then, no problem.
>
> Can anybody explain ?
CFSTR is only meant to be used with string literals.
> ------------------------------------------------------------
> THIS E-MAIL MESSAGE IS FOR THE SOLE USE OF THE INTENDED RECIPIENT AND MAY CONTAIN CONFIDENTIAL AND/OR PRIVILEGED INFORMATION. ANY UNAUTHORIZED REVIEW, USE, DISCLOSURE OR DISTRIBUTION IS PROHIBITED. IF YOU ARE NOT THE INTENDED RECIPIENT, CONTACT THE SENDER BY E-MAIL AT email@hidden AND DESTROY ALL COPIES OF THE ORIGINAL MESSAGE. WITHOUT PREJUDICE UCC1-207.
> ------------------------------------------------------------
Oh, then I guess I'm not allowed to read your message.
--
Clark S. Cox III
email@hidden
_______________________________________________
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