C++ Q39: throw new (C1)# JobHunting - 待字闺中
c*e
1 楼
class A {};
class B : A {};
void foo() { throw new B; }
Which of the following catch statements successfully catches the exception
foo throws?
a) catch (A* e) and catch (B* e)
b) catch (A e) and catch (B e)
c) catch (A* e)
d) catch (B* e)
e) catch (A e)
I have no answer. Help, please.
class B : A {};
void foo() { throw new B; }
Which of the following catch statements successfully catches the exception
foo throws?
a) catch (A* e) and catch (B* e)
b) catch (A e) and catch (B e)
c) catch (A* e)
d) catch (B* e)
e) catch (A e)
I have no answer. Help, please.