#include <iostream>
#include <exception>
using namespace std;
class a {
public:
virtual void f(int) { cout<<"a int"; }
virtual void f(char*) { cout<<"a char*"; }
};
class b : public a {
public:
virtual void f(char*) { cout<<"b char*"; }
};
int main (void) {
b* o = new b;
o->f(0);
return 0;
}
Login in to like
Login in to comment