#include <iostream>
using namespace std;
struct A {};
struct B: A {};
struct C: B {};
int main() {
try {
throw new C();
} catch(void *) {
cout<<0;
} catch(A*) {
cout<<1;
} catch(B*) {
cout<<2;
} catch(...) {
cout<<3;
}
}
Login in to like
Login in to comment