1
0

」 feat(Ex00): added a very cool feature !

This commit is contained in:
2024-12-01 20:24:38 +01:00
parent 467c3be3c3
commit c22dad6f83
15 changed files with 333 additions and 0 deletions

37
ex00/main.cpp Normal file
View File

@ -0,0 +1,37 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/11/30 16:21:28 by adjoly #+# #+# */
/* Updated: 2024/12/01 20:23:26 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "cat.hpp"
#include "dog.hpp"
#include <iostream>
//int main(void) {
// cat cutie;
// dog dogo;
//
// cutie.makeSound();
// dogo.makeSound();
//}
int main() {
const Animal* meta = new Animal();
const Animal* j = new Dog();
const Animal* i = new Cat();
std::cout << j->getType() << " " << std::endl;
std::cout << i->getType() << " " << std::endl;
i->makeSound(); //will output the cat sound!
j->makeSound();
meta->makeSound();
return 0;
}