When we are writing C++ programs, the compiler is our first line of defense against errors.
There are two types of compile-time errors:
Some common syntax errors are:
), square bracket
], or curly brace
Some common type errors are:
Here’s an example of a compile-time error message:
The compiler will tell us where (line number) it got into trouble and its best guess as to what is wrong.
Try compiling the code and find the compile-time error in millionaire.cpp.