Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. class My_exception:public exception
  5. {
  6. public:
  7. const char* what() { return "rrrr"; }
  8. };
  9. int main()
  10. {
  11. try {
  12.  
  13. throw My_exception();
  14. }
  15. catch (My_exception& e) {
  16. cout<<e.what();
  17. }
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement