Reputation: 19418
I am parsing an XML but having some problem regrading its attribute. I wan to fetch a value and want to convert into int. in my .h file I have declared
int *count;
and set property (nonatomic , readwrite)int *count;
in .m file
self.count = [[attributeDict objectForKey:@"count"] intValue];
but it gives error " warning: initialization makes pointer from integer without a cast "
what is wrong ?
Thanks..
Upvotes: 0
Views: 70
Reputation: 86651
Because you have declared your instance variable as a pointer to an int
instead of as an int
. Drop the *
from the instance variable and the property declaration and make sure the property is assign
not retain
.
Upvotes: 4