Animal class started

This commit is contained in:
2025-11-08 20:28:29 +01:00
commit 36cce8c388
4 changed files with 107 additions and 0 deletions

25
ex00/Animal/Animal.cpp Normal file
View File

@@ -0,0 +1,25 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Animal.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/06 02:27:27 by aortigos #+# #+# */
/* Updated: 2025/09/06 02:28:09 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
#include "Animal.hpp"
Animal::Animal() : type("Animal")
{
std::cout << "Animal has been created" << std::endl;
}
Animal::~Animal()
{
std::cout << "Animal has been destroyed" << std::endl;
}

28
ex00/Animal/Animal.hpp Normal file
View File

@@ -0,0 +1,28 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Animal.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/09/06 02:27:27 by aortigos #+# #+# */
/* Updated: 2025/09/06 02:28:09 by aortigos ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef ANIMAL_HPP
# define ANIMAL_HPP
# include <iostream>
class Animal
{
private:
std::string type;
public:
Animal();
~Animal();
};
#endif