Click here to Skip to main content
15,914,413 members

Comments by Member 13749758 (Top 1 by date)

Member 13749758 23-Aug-22 15:50pm View    
Thanks for your answer. I've already tried similar way. But the problem is that in my first sample, I have two methods with same name, same signatures, distinguished by scope resolution operator, but I cant define these methods outside class CTest.
I just wonder if it is possible. I dont want one method to override two virtual methods (as in your reply). I want one method override the one from IA and second method override the one from IB.

This one works:
class CTest:public IA, public IB
{
public:
void IA::Test() {cout << "Test from A" << endl;}
void IB::Test() {cout << "Test from B" << endl;}
};

But I want it to be outside the class...