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;
(不枚舉一次。)