我刚刚尝试过这段代码: 
  
  
 
struct FaceOfPast
{
    virtual void Smile() = 0;
};
struct FaceOfFuture
{
    virtual void Smile() = 0;
};
struct Janus : public FaceOfPast,public FaceOfFuture
{
    virtual void Smile() {printf(":) ");}
}; 
 …
void main()
{
    Janus* j = new Janus();
    FaceOfFuture* future = j;
    FaceOfPast* past = j;
    future->Smile();
    past->Smile();
    delete j;
} 
 它的工作原理(输出两个笑脸),但我不认为它甚至应该编译,重新声明Smile()在Janus是不明确的.
如何(和为什么)它的工作?
解决方法
 没有歧义,因为你调用Smile()指向FaceOfFuture和FaceOfPast,只声明一个方法Smile(). 
  
 
        因为在基类指针上调用方法不能导致歧义,所以我们直接在子类指针上调用方法来处理这种情况:
Janus* j = new Janus(); j->Smile();
派生类除了重写之外,还隐藏了基类的声明Smile().只有当您不会覆盖派生类中的方法时,您才会有歧义:
以下编译:
struct FaceOfPast
{
    virtual void Smile() {printf(":) ");}
};
struct FaceOfFuture
{
    virtual void Smile() {printf(":) ");}
};
struct Janus : public FaceOfPast,public FaceOfFuture
{
   virtual void Smile() {printf(":) ");}
};
int main()
{
   Janus* j = new Janus();
   j->Smile();
} 
 虽然您在Janus上调用Smile,但是基类声明是隐藏的.
以下不是:
struct FaceOfPast
{
    virtual void Smile() {printf(":) ");}
};
struct FaceOfFuture
{
    virtual void Smile() {printf(":) ");}
};
struct Janus : public FaceOfPast,public FaceOfFuture
{
};
int main()
{
   Janus* j = new Janus();
   j->Smile();
} 
 由于含糊不清