No, you can't do it directly. There are ways around this limitation however. You would have to introduce an intermediate step:
class C : public I, public J
{
public:
virtual void I::foo() { fooI(); }
virtual void J::foo() { fooJ(); }
void fooI();
void fooJ();
};
void C::fooI() { cout << "I" << endl; }
void C::fooJ() { cout << "J" << endl; }
It isn't exactly pretty, but AFAIK it's the best way to do what you need.