Kamis, 27 Oktober 2016

How to handle multiple catch statements in c++

A try block can be associated with more than one catch block. Multiple catch statements can follow a try block to handle multiple exceptions. The first catch block that matches the exception type will execute and the control shifts to next statement after all the available catch blocks.   A try block should be followed by at least one catch block. If non catch block matches with the exception, then terminate() function will execute. Following program demonstrates handling multiple exceptions using multiple catch statements: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

The post How to handle multiple catch statements in c++ appeared first on Coding Security.


How to handle multiple catch statements in c++
read more

Tidak ada komentar:

Posting Komentar