Understanding iOS Compiler Errors – Expected ‘;’ after method prototype

Expected ‘;’ after method prototype

You usually get this error in a class header file method
declaration if you forget to put a colon (not
a semicolon) before a parameter. For example, there is a colon missing after addToTotal, the method name:

- (double) addToTotal(double)value;

To fix the problem, just add a colon before the parameter:

- (double) addToTotal:(double)value;

———————————————————————————————————————————————————————-

For explanations of other compiler errors and warnings, check out our new book site: http://www.iOSAppsForEveryone.com

Kevin McNeish
Eight-time .NET MVP Recipient
Apple iOS Author, Trainer
http://www.iOSAppsForEveryone.com 

FourBooks

One thought on “Understanding iOS Compiler Errors – Expected ‘;’ after method prototype”

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>