fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. class T{};
  6. class E: public T{};
  7.  
  8. int main() {
  9. try{throw E();}catch(T){std::cout<<"catched";};
  10. return 0;
  11. }
Success #stdin #stdout 0.02s 2812KB
stdin
Standard input is empty
stdout
catched