You are here:

C++/c++ exception handling

Advertisement


Question
Q:What is the importance of exception handling in C++. How it differs from the C's error handling mechanism?
Kindly explain in detail.

Thank you very much for your effort.
Regards
Sunil.

Answer
Dear Sunil!

  Even though C is a subset of C++ , Programmers Treat both c and C++ as a different language .
  Every language have its own method of error handling But many languages fails ( such as COBOL and so on .. )
  If there is no error handling mechanism ( Say specially languages compatible for system programming c , C++ ...) the effect will be serious may crash the system  , so it have to be avoided ( Say a pointer trying to alter the variable in system area without the knowledge of programmer , may be by mistake of the programmer ) in such cases the error handling mechanism will take necessary actions to avoid that situation.
    So the error handling mechanism is essentially useful in language like C/C++ , it will allow greater flexibility to the programmer

Note : this answer will suit for all the languages that includes error handling mechanism depends on the application.

Regards !
Prince M. Premnath.

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Prince M. Premnath

Expertise

Years of research in C/C++ Will bring you all facts regarding , OOPS , SVGA , MOUSE , BIOS , IVT , Feel free to query me :-)

Experience

More than 5 years

Education/Credentials
MCA

©2016 About.com. All rights reserved.