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: Retaining 2D array values




Am 30.12.2005 um 22:02 schrieb jz:

1. How do I retain old values in a global array after a value change?

Copy them to some other variable before doing the change?


#import <Cocoa/Cocoa.h>
int gM[8][8];
@interface Controller : NSObject { }

Using global variables is considered a bad idea in the object oriented world. Objects with a lifetime similar to the app's lifetime would be better.



Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/




_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


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.