您的位置:首页 > 移动开发 > IOS开发

ios 局部变量,全局变量,成员变量

2014-08-13 15:02 253 查看
[html] view
plaincopy

int gCounter;//全局变量



@interface MyObject : NSObject {

int counter;//成员变量

}

@end

[html] view
plaincopy

@implementation MyObject

[html] view
plaincopy

NSString *str=@"";//????

- (void) print {

int cter = 0;//局部变量

NSLog(@"%i", cter );

}

@end
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: