Reputation: 16051
And i can't seem to figure it out. Here's one of the lines it has trouble with:
hourToReadOut = currentHourInt - 12;
hoursToReadOut
and currentHoursInt
are both integers from the .h file. currentHourInt is always set to something.
Upvotes: 0
Views: 305
Reputation: 484
Did you maybe declare one as a pointer to an int? NSInteger* when you meant NSInteger or int* instead of int? Or is one perhaps an NSNumber object from which you should be calling intValue?
Upvotes: 1
Reputation: 26060
This error is given when you assign a pointer to an integer:
int *intPtr;
int intVar;
intVar = intPtr - 12;
It looks like currentHourInt
is a pointer, not an integer, are you really sure it's not?
Upvotes: 5