Animal class started
This commit is contained in:
25
ex00/Animal/Animal.cpp
Normal file
25
ex00/Animal/Animal.cpp
Normal 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
28
ex00/Animal/Animal.hpp
Normal 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
|
||||
Reference in New Issue
Block a user