/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* main.cpp :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/06/24 08:28:40 by narnaud #+# #+# */ /* Updated: 2022/06/24 10:16:31 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #include "Dog.hpp" #include "Cat.hpp" #include "WrongCat.hpp" int main(void) { const Animal* meta = new Animal(); const Animal* i = new Cat(); const Animal* j = new Dog(); const WrongAnimal *k = new WrongCat(); std::cout << i->getType() << " " << std::endl; std::cout << j->getType() << " " << std::endl; i->makeSound(); //will output the cat sound! j->makeSound(); meta->makeSound(); k->makeSound(); return (0); }