fork download
struct IAnimal {
    virtual ~IAnimal() {}
    virtual void isAlive() = 0;
};

struct IPet : virtual public IAnimal {
};

struct CAnimal : virtual public IAnimal {
    virtual void isAlive() {
    }
};

struct CPet : virtual public CAnimal, virtual public IPet {
};

int main(void) {
    CPet cp;
}
Success #stdin #stdout 0.02s 2720KB
stdin
Standard input is empty
stdout

Standard output is empty