Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class My_exception:public exception
- {
- public:
- const char* what() { return "rrrr"; }
- };
- int main()
- {
- try {
- throw My_exception();
- }
- catch (My_exception& e) {
- cout<<e.what();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement