4
我想有一个枚举作为我的方法签名的一部分,我得到这个可怕的错误在我的.h文件:变量与不完全型目标C
Declaration of 'enum CacheFile' will not be visible outside this function
我有这个在我的.h文件:
@interface DAO : NSObject
typedef enum {
DEFAULT_CACHE_FILE,
WEB_CACHE_FILE
} CacheFile;
-(NSMutableArray *) parseFile :(enum CacheFile) file;
@end
我.m文件:
-(NSMutableArray *) parseFile:(CacheFile) file{
.....
....
}
而且我得到了我的M档这样的警告:
Conflicting Parameter types in implementation of 'parseFile:':'enum CacheFile' vs 'CacheFile'
我在做什么错?
-(NSMutableArray *) parseFile :(CacheFile) file;
(不枚举一次。)