You are viewing a single comment's thread. Return to all comments →
you can use the standard exception as used above. Else you can also use default exception.
The only difference is the change in parameters in the catch function
It would look like:
catch(...) { cout<<"Bad String"; }
Both works!
Seems like cookies are disabled on this browser, please enable them to open this website
Day 16: Exceptions - String to Integer
You are viewing a single comment's thread. Return to all comments →
you can use the standard exception as used above. Else you can also use default exception.
The only difference is the change in parameters in the catch function
It would look like:
Both works!