Question

I am trying to write this code:

[[NSNotificationCenter defaultCenter] 
        postNotificationName:EVENT_TIME_OVER object:nil];
                                            ^          ^

EVENT_TIME_OVER is defined in a Constants.h file like so:

#define EVENT_TIME_OVER @"event.TIME_OVER";

Why would I get the errors: Expected ']' and Extraneous ']' before ';' where the ^ mark above? I have used similar code before in other apps, but this time it will not compile because of these errors.

Was it helpful?

Solution

Replace this

#define EVENT_TIME_OVER @"event.TIME_OVER";

with

#define EVENT_TIME_OVER @"event.TIME_OVER"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top