What are compilation errors?
- errors that show up when the code is getting compiled, i.e. running
gcc
Why do compilation errors occur?
- syntax
- missing punctations like
;
- misspelled function names like
prinf
- wrong case like
Prinf
- wrong function arguments like too many arguments or wrong types of arguments
- mismatched brackets like
{{ }
How to use compilation errors?
- the error message will get you close to the line number of where the error occurred
- the error message will give you a sense of what's wrong
- compile often so you know exactly which part of the code you recently updated that is causing the error
- remove half the code so you can see which half is producing the error; repeat to narrow down the bad line of code