A secret to solve the compiler errors quickly

see the first error observed by the compiler. If you cleared that there are 80% chances that your code compiles after that. for example a semi colon created this much error.

stone.c: In function ‘main’:
stone.c:21:3: error: expected ‘;’ before ‘if’
stone.c:24:3: error: expected ‘}’ before ‘else’
stone.c: At top level:
stone.c:32:2: error: expected identifier or ‘(’ before ‘else’
stone.c:33:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
stone.c:33:22: error: expected identifier or ‘(’ before ‘++’ token
stone.c:35:2: error: expected identifier or ‘(’ before ‘return’
stone.c:36:1: error: expected identifier or ‘(’ before ‘}’ token

which could be easily corrected by observing the first line of error..

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s