diff --git a/ex01/src/WrongCat.cpp b/ex01/src/WrongCat.cpp index 5dd473c..9c3573b 100644 --- a/ex01/src/WrongCat.cpp +++ b/ex01/src/WrongCat.cpp @@ -22,3 +22,8 @@ WrongCat::WrongCat(const WrongCat& src): WrongAnimal() { *this = src; } + +void WrongCat::makeSound() const +{ + std::cout << "Meow Meow !" << std::endl; +} diff --git a/ex01/src/WrongCat.hpp b/ex01/src/WrongCat.hpp index e2b6f10..c05d596 100644 --- a/ex01/src/WrongCat.hpp +++ b/ex01/src/WrongCat.hpp @@ -11,4 +11,6 @@ class WrongCat : public WrongAnimal WrongCat &operator=(const WrongCat& src); WrongCat(); ~WrongCat(); + + void makeSound() const; }; diff --git a/ex01/src/main.cpp b/ex01/src/main.cpp index 7926127..7538265 100644 --- a/ex01/src/main.cpp +++ b/ex01/src/main.cpp @@ -2,6 +2,7 @@ #include "Cat.hpp" #include "Dog.hpp" +#include "WrongAnimal.hpp" #include "WrongCat.hpp" int main() @@ -12,5 +13,8 @@ int main() delete j; const Animal* i = new Cat(); delete i; + const WrongAnimal* k = new WrongCat(); + k->makeSound(); + delete k; return 0; }