-1

有人可以帮我解决这个错误吗?我已经在我正在处理的另一个调整中使用了它,并且获得 intValue 没有问题,但由于某种原因,现在是这样,我正在通过 theos 创建一个 WeeAppPlugin

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
4

1 回答 1

1

使用这种方式,不需要对枚举进行指针

static WSSMSClient smsClient;
static WSTwitterClient twitterClient;
于 2013-01-10T18:21:01.187 回答