我已经想到了声明私有变量的不同方法。我想知道它们之间是否有任何区别。
第一种方式:
//In .h file
@interface DataExtract : NSObject
{
@private
double test;
}
第二种方式:
//In .m file. test is not declared in .h file
static double test;
第三种方式:
//In .m file. test is not declared in .h file
double test;
任何帮助将非常感激。谢谢你。