passing argument 1 from incompatible pointer type

Posted by Andrew on Stack Overflow See other posts from Stack Overflow or by Andrew
Published on 2010-03-15T07:14:05Z Indexed on 2010/03/15 7:19 UTC
Read the original article Hit count: 410

Filed under:
|

Why does this code...:

NSDictionary *testDictionary = [NSDictionary dictionaryWithObjectsAndKeys:kABOtherLabel, @"other", kABWorkLabel, @"work", nil];

throw this warning:
warning: passing argument 1 of 'dictionaryWithObjectsAndKeys' from incompatible pointer type

Incidentally, the code works as expected, but I don't like leaving warnings un-delt-with. I assume it doesn't like that I'm storing a constant in a dictionary. Well, where can I store it then? Should I just place (void *) before every constant?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about nsdictionary