Saturday, February 19, 2011

#warning #error

#warning
The directive #warning is similar to #error, however the preprocessor doesn’t stop when it finds this directive, it simply displays the message to the console and keeps on with the task at hand. One common use of #warning is to display information regarding deprecated code:

#warning : This method is deprecated, use someNewMethod instead

#error
When the preprocessor runs into the #error directive, it will write an error to the console and generate a compile time error. You can also include a text string which is displayed as an error message.

#error : Change this value to your Flickr key
NSString* const FlickrAPIKey = @"your-key-here";


See full article

No comments:

Post a Comment