Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: static CFSTR in C



On 8/27/03 5:19 PM, Marc Poirier didst favor us with:

>> Well, I don't know how do it with CFSTR(), and I'd like to for improved
>> efficiency (see below).
>
> No, it works fine with C++, different rules for initializing global
> variables. You can have this outside of any function definition in a C++
> source file and it will build and work just fine:
>
> static const CFString yoop = CFSTR("woof");

You're right. I just don't know how I was trying to do it before (that was a
long time ago) that it didn't work. ;-)

Larry
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.