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



0
0
1
51
292
Oak Leaf Enterprises, Inc
2
1
342
14.0







Normal
0




false
false
false

EN-US
JA
X-NONE













































































































































































0
0
1
5
32
Oak Leaf Enterprises, Inc
1
1
36
14.0







Normal
0




false
false
false

EN-US
JA
X-NONE









































































































































































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 

 


 

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>