Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Custom C++ exception class creation

In standard C++, we can use try catch to catch and exception when something goes wrong. These are some built in exception support in C++. By including the #include , we can now catch exceptions in C++ programs. This actually helps us on debugging our code and reduce the maintenance work.However sometimes if we want to create our own custom exception class. What should we do?We should include the #include line and then extend the exception class and implement some methods as you like. The general format is :#include using namespace std;class MyException:public exception{public:  &nbs...

31,475 2       C++ IMPLEMENTATION STD EXCEPTION CUSTOM EXCEPTION