Re: Is there a pattern for creating an object with global scope?
Re: Is there a pattern for creating an object with global scope?
- Subject: Re: Is there a pattern for creating an object with global scope?
- From: Scott Ribe <email@hidden>
- Date: Fri, 12 Apr 2013 19:54:53 -0600
On Apr 12, 2013, at 7:30 PM, YT wrote:
> Is this even possible?
Yes, extremely easy, just "create" the var, as in:
int gFoobar = 42;
Then reference it elsewhere as:
extern int gFoobar;
***NOW*** whether or not this is a good thing to do, particularly for your preferences, and also some details about extern var declarations/definitions that vary between versions of C, are different questions ;-)
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
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