1

Possible Duplicate:
C++ virtual override functions with same name

I have class which must implement two interfaces with the same method. For example:

class IInterface1
{
public:
    virtual void Method() = 0;
};

class IInterface2
{
public:
    virtual void Method() = 0;
};

class Implementation : public IInterface1, IInterface2
{
    // ???
};

Is this possible? If yes, what is exact syntax to use in .h and in .cpp file.

Note. I can do this with two helper classes implementing IInterface1 and IInterface2. But I am curious whether it is possible to do directly.

Community
  • 1
  • 1
Alex F
  • 42,307
  • 41
  • 144
  • 212

0 Answers0