0

How to use the catch(...) statement in c++?

I do not understant how to use (...) in catch(){}. Can you give me directions?

9th Dec 2016, 8:17 PM
Edison
1 Antwort
+ 1
The catch is used to hold the Exception you want to catch. "Exception" is the base of all exceptions you can use Catch(Exception ex) { //and here you can use the "ex" in order to return a message such as ex.Message or what you want to do incase of an expetion. } you can also use the catch in order to handle specific expetions incase you dont want to catch any excpetion that occurs.
9th Dec 2016, 9:24 PM
Elie Boustany
Elie Boustany - avatar