typedef enum {
appleSMS = 0,
biteSMSClient = 1
} WSSMSClient;
typedef enum {
appleTwitter = 0,
twitkaflyClient = 1
} WSTwitterClient;
static WSSMSClient *smsClient;
static WSTwitterClient *twitterClient;
- (void)loadSettings {
[_settings release];
_settings = [[NSDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.michaelpoole.weesocial.plist"];
smsClient = [[_settings objectForKey:@"smsClient"] intValue];
twitterClient = [[_settings objectForKey:@"twitterClient"] intValue];
}
错误是
WeeSocialController.m:213: warning: assignment makes pointer from integer without a cast
WeeSocialController.m:214: warning: assignment makes pointer from integer without a cast
答案 0 :(得分:1)
使用这种方式,无需指向枚举
static WSSMSClient smsClient;
static WSTwitterClient twitterClient;