Creating user-defined exceptions in C++ can be achieved by inheriting the _______ class. 

  • std::exception 
  • std::error 
  • std::runtime_error 
  • std::catchable
In C++, user-defined exceptions are often derived from the std::exception class or its sub-classes. This allows them to be caught using catch blocks designed for standard exceptions, while also adding custom behavior.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *