(E) Different kinds of error messagesΒΆ
Goal: I will explore error messages given by Qt Creator.
Instructions:
Retrieve the code template: templates/02/errors/
->
student/02/errors/
.
The code template comprises three errors: one compile-time error, one linking error, and one run-time error. Fix the errors and submit a correct program to the course platform.
The abovementioned errors can be found in a certain order.
- The first thing to do is to compile/run the program. Because the program has a compilation error, the compilation does not succeed. Errors detected during compilation are typically syntax errors, e.g. misspellings. Compilation errors are the easiest ones to detect, since the compiler shows you the erroneous line.
- After correcting the compilation error, try to run the program again. The next error to be detected is a linking error. Linking errors typically occur when each program structure is correct, but such program structures (or parts or files) are inconsistent with each other.
- After correcting the linking error, try to run the program again. Now, it shoud succeed. Therefore, you can execute the program, but due to the run-time error, it does not work as it should do.
Tips for completing the assignment:
- Pay attention to how you can see the difference between these three kinds of errors in Qt Creator. Understanding this makes things easier in sequel.
A+ presents the exercise submission form here.