0
How to use the catch(...) statement in c++?
I do not understant how to use (...) in catch(){}. Can you give me directions?
1 Resposta
+ 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.