Linker Errors
When the program is successfully compiled and attempting to link the different object files with the main object file, errors will occur. When this error occurs, the executable is not generated. This could be due to incorrect function prototyping, an incorrect header file, or other factors. If main() is written as Main(), a linked error will be generated.
Example:
C++
// C++ program to demonstrate // a linker error #include <iostream> using namespace std; int Main() { cout << "Geeks for geeks" ; return 0; } |
Output:
C++ Program to Show Types of Errors
In any programming language errors is common. If we miss any syntax like parenthesis or semicolon then we get syntax errors. Apart from this we also get run time errors during the execution of code. In a similar way the errors are classified as below:
- Syntax Errors
- Runtime Errors
- Logical Errors
- Linked Errors
- Semantic Errors