Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
Hi all.

I am having a myShoppingCart class in my iPhone app, and i want an object of the myShoppingCart class through out the app. The doubt is that i read that Objective C doesnt support class variables, but it can make use of static variables in C .. What it means???

can i use like this (below)

@implementation myShoppingCart

@public static myShoppingCart cartObject

@end

Can i use this cartObject throughout the app???
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.