开发者

Comparison between pointer and integer?

How would I fix this warning in this if statement?

if ((NSUInt == nil) || (myInt == nil)) {
    NSUInt = 0;
    myInt = 0;
}

I get comparison between pointer and intege开发者_JAVA技巧r.

Thanks!

Edit: This seemed to fix it:

if ((!NSUInt) || (!myInt)) {
    NSUInt = 0;
    myInt = 0;
}


Then don't compare pointers and integers:

myInt == 0

(I'm guessing that myInt is an integer, but I don't know what NSUInt is.)


did you try simple !myInt instead of myInt==nil and !NSUInt instead of == 0?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜