#include <iostream>
using namespace std;

class A{
    public:
    void show() 

    { 

        cout << "Hello form A \n"; 

    } 
}; 

  

class B : public virtual A { 
}; 

  

class C : public virtual A { 
}; 
class D : public virtual B, public C { 
}; 

  

int main() 
{ 

    D object; 

    object.show(); 

    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: