#include using namespace std; class A { virtual void f(int x) throw () { cout << "A:f x = " << x << endl;}; public: void F( int x) { f(x); } }; struct B : public A { public: void f(long y) throw () { cout << "B:f(long y) = " << y << endl;}; void f(int x) throw () { cout << "B:f(int x) throw () = " << x << endl;}; }; int main() { A a; B b; a.F( 0); b.f( 1); b.f( 2l); A *pb = &b; pb->F( 3); pb->F( 4l); return 0; }