0
How exception work
How try, catch and throw run on c++
1 Antwort
0
Exceptions help program work, in way that make program to complete in normal flow when if there is any error that may cause Program to terminate.
We need to write the part of code that may cause to raise exception in the try block..
Catch block handle exception raised by try block and control passed to next statements immediately after catch.
If there is no try, catch then Program stops execution where exception is raised...
See this may help you understand it better way...
https://www.javatpoint.com/cpp-try-catch