#include #include using namespace std; class Animal { public: void Eat() { cout << " an animal is eating, nom nom nom" << endl; } void Add(int amt) { i += amt; } int Get() { return i; } private: int i{0}; }; class Owl: public virtual Animal { public: void Screech () { cout << "An owl is screaching " << endl ; } }; class Bear: public virtual Animal { public: void Growl (){ cout << "A bear is growling " << endl; } }; class OwlBear: public Owl, public Bear { public: void Vocalize() { cout << "\t"; Screech(); cout << "\t"; Growl(); } void Confusion() { Owl::Add(5); Bear::Add(100); cout << "The owl side thinks the value is " << Owl::Get() << endl; cout << "The bear side thinks the value is " << Bear::Get() << endl; } }; int main() { Owl owl; Bear bear; OwlBear owlBear; owl.Screech(); owl.Eat(); bear.Growl(); bear.Eat(); owlBear.Vocalize(); owlBear.Screech(); owlBear.Growl(); owlBear.Eat(); // owlBear.Confusion(); return 0; }