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