ok i just started learning this exception handling thingy and i'm really confusing myself.
If exception handling used so we don't have to do error-checking too often , then why do the catch block has to come right after try block? it doesn't make sense to me..
ok so here are my questions :
- Do i have to manually throw all exceptions manually or are there exceptions that gets thrown automatically? (like new's bad_alloc fpr example , i'm guessing so i don't know)
- Whats the difference between :
cout << c.what() << endl;
both work the same way !!!!
cout << str << endl;
- last question .... what sensitive tasks require exception handling? (other than new)
any help is appreciated
this thing is really making me nervous