How is exception handling carried out in c++?

Answer Posted / achal ubbott

Exception handling is not a must of programming. But it is
a cleaner way of getting signal if something goes wrong in
the code. Prior to exceptions people used return values of
functions for reporting errors to application using the
classes inside libraries. The application would call some
function(defined inside class) from within try bock. Now if
something goes wrong then the function(defined inside the
class) would throw an exception. This exception is then
handled by catch block in the application.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the real time example of encapsulation?

593


What is purpose of inheritance?

643


What is methods in oop?

537


What is destructor example?

593


What is abstraction oop?

623






Is this job good for future? can do this job post grduate student?

1689


What is the problem with multiple inheritance?

582


if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?

2753


What is destructor oops?

619


What are oops methods?

566


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

1637


What is object-oriented programming? Webopedia definition

719


What is the point of polymorphism?

584


Get me an image implementation program.

1557


Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)

3550