Defining types Of Error In C++

Basic concepts about types of error in c++

Posted by Zohaib Qazi on may 15, 2017

Defining Types Of Error In C++

After reading this post you will come to understand the basic types of errors of c++, what are errors and how many types of errors are in c++ .however, clear your concept by reading this post and watching our Balochi videos which is placed below.

Error in c++

Error is a sudden condition whenever an error arises execution of the program is stopped and the whole program gets terminated. The error can be any keyword or spelling mistake or representing any wrong word. There are two types of errors.
Syntax error
Logical error

Syntax

Syntax error is a type of error that is arises when an invalid statement is written in program. Then the compiler detect the error and display error massage on screen to describe that an error is detected.
Example
Semicolon is missing ;
Misspelled Keyword return
Missing two less than operator <<

Logical error

A logical error is a type of error which is a bug in program that cause an unwanted output and the program will not recognize the error.
Example
Addition of 2 + 2 is 4 but in output 5 is shown

Defining Types of Error In C++ Video in Balochi