Section of C language code, all problems can occur at various stages of compiling, linking and running. The compiler can only check the problem compile and link phases occur, and an executable program has been out of the compiler, the operational phase problems compiler is powerless.
If we write the code correctly, you will prompt no errors (Error) and warnings (Warning), as shown below runtime:
Figure 1: Dev C ++ tips
Figure 2: VC Tips 6.0
Figure 3: C-Free 5.0 Tips
For VS, GCC, Xcode, etc., if the code is not an error, they will only display the "Generate success" does not show "0 errors, 0 warnings", only the code is really wrong, they will show specific error message .
Error (Error) indicates that the program is not correct, can not properly compile, link, or run, must be corrected.
Warning (Warning) indicates an error (in fact, did not occur) may occur or the code is not standardized, but the program to run properly, some warning can be ignored, and some to attract attention.
Errors and warnings that may occur at any time to compile, link, run.
For example, puts("C语言中文网")
the last semicolon forget to write ;
, an error occurs, as shown below:
Figure 4: error of VS2015
Figure 5: Dev C ++ is error
Figure 6: error of VC 6.0
Figure 7: error of C-Free 5.0
As can be seen, the error message C-Free is relatively small, convenient programmer error correction. VC and VS error message similar, but the difference in English.
The following diagram analysis of VC 6.0 error message:
Figure 8: Error Message Description
Translation: source file E: \ cDemo \ hello.c line 5 syntax error has occurred, the error code is C2143, due to 'return' front lost ';'.
I can guarantee that the code you write is certainly an error occurs, the error must have the ability to analyze, which is an essential skill for qualified programmers.