fork download
  1. struct IAnimal {
  2. virtual ~IAnimal() {}
  3. virtual void isAlive() = 0;
  4. };
  5.  
  6. struct IPet : virtual public IAnimal {
  7. };
  8.  
  9. struct CAnimal : virtual public IAnimal {
  10. virtual void isAlive() {
  11. }
  12. };
  13.  
  14. struct CPet : virtual public CAnimal, virtual public IPet {
  15. };
  16.  
  17. int main(void) {
  18. CPet cp;
  19. }
Success #stdin #stdout 0.02s 2720KB
stdin
Standard input is empty
stdout

Standard output is empty