Error in C++

Google Advertisements

Prev Tutorial Next Tutorial

Types of Error in C++

Error is a abnormal condition whenever it occurs execution of the program is stopped these are mainly classified into following types.

Types of Error in C++

  • Compile time error
  • Run time error

Compile Time Error

If any error is generated at the time of compilation is known as compile time error, in general these are raised while break down the rules and regulation of programming language. Compile time errors also known as syntax errors.

Compile Time Error Example

Missing semicolon, writing keyword in upper case.

Compile time error Compile time error

Run time error

If any error is generated at run time is known as runtime error, in general these are raised because of writing wrong logic in the program.


Calling function without existence, divide by zero.
Int a=10,b;
B=a/0; --> infinite
Here out of range of int data type.

In general it is very difficult to identify logical error in C language, to overcome this problem exception handling was introduced in object oriented programming language.

error in c++


Warning is also an abnormal condition but whenever it occurred execution of program will never be stopped.

Note: In C language warning can be neglected but error can not be neglected.

Warning in c++ Warning in c++
Prev Tutorial Next Tutorial

Google Advertisements

Buy This Ad Space @$50 per Month, Ad Size 600X200 Contact on: or 8076671483

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Cloud computing is the on demand availability of computer system resources, especially data storage and computing power, without direct active management by the user. Cloud Computing Tutorial

College Projects Related to Java, AWT, C Projects for College, C++ Projects for College, Android Projects. Download Java C C++ Projects

Download Projects

Adsense Advertisements

Buy This ads Space 8076671483

Buy This Ad Space @$120 per Month, Ad Size 300X600 Contact on: or 8076671483 Try this Keyword C++ Programs