How can I avoid compilation errors in C++?
Compilation Error:- When the program compiles and produces error then that is called Compilation error.
Generally Compilation error occurs when the user does
not follow the syntax while writing program.
Here are the technique to avoid Compilation error.
1. Check all the required statement ends with
semicolon(;)
2. Check the parentheses mismatch of either kind that is () or
{}.
3. Always Declare variable before using it.
4. Always use the proper syntax of for, while or do-while
loop.
5. Use proper syntax of if else statement.
6. In general before using any functionality, we must first
understand the syntax.
7. Sometimes illegal character is inserted somewhere that causes
Compilation error.
Get Answers For Free
Most questions answered within 1 hours.