fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void herpa() {
  5. int a;
  6. throw a;
  7. }
  8.  
  9. int main() {
  10. try {
  11. herpa();
  12. } catch (int& a) {
  13. std::cout << "hehehe" << std::endl;
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0s 4384KB
stdin
Standard input is empty
stdout
hehehe