static variables in Objective-C - what do they do?

I've seen a few posts discussing what a static variable is and I think I get it - but I'd love to quickly write (or find) a program that utilizes both a regular and a static variable, side by side, and see how/when they operate differently. Some quick n dirty code, maybe two int vars and a couple of NSLog tracking statements just to see HOW they're different.

Anybody got any tips/ideas/code out there that would illustrate how a static var differs from a regular one?

31
задан Sirab33 11 February 2011 в 02:28
поделиться