adding the start of ex01 with the patched for cpp98

This commit is contained in:
Raphael 2025-02-06 23:29:03 +01:00
parent 1cff8e9d9e
commit f7bd1abc3c
15 changed files with 185 additions and 35 deletions

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/01/30 13:21:01 by rparodi #+# #+# */
/* Updated: 2025/01/30 13:37:51 by rparodi ### ########.fr */
/* Updated: 2025/01/31 19:53:47 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -14,19 +14,18 @@
#include <iostream>
Animal::Animal() {
std::cout << "[Animal] Creating the class" << std::endl;
std::cout << "[Animal]\tCreating the class" << std::endl;
type = "";
}
Animal::~Animal() {
std::cout << "[Animal] Deleting the class" << std::endl;
std::cout << "[Animal]\tDeleting the class" << std::endl;
}
void Animal::makeSound() {
if (type.compare("Cat"))
std::cout << "🐱 | Meow Meow" << std::endl;
else if (type.compare("Dog"))
std::cout << "🐶 | Wouf Wouf" << std::endl;
else
std::string Animal::getType() const {
return (type);
}
void Animal::makeSound() const {
std::cout << "🤔 | thinking how to make a sound" << std::endl;
}