Created Brain

This commit is contained in:
Angel Ortigosa Perez
2025-11-10 13:13:26 +01:00
parent a6f3e7ea31
commit b4b5a9b592
2 changed files with 19 additions and 2 deletions

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */ /* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/11/10 11:22:21 by aortigos #+# #+# */ /* Created: 2025/11/10 11:22:21 by aortigos #+# #+# */
/* Updated: 2025/11/10 11:33:52 by aortigos ### ########.fr */ /* Updated: 2025/11/10 12:45:21 by aortigos ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@@ -21,3 +21,18 @@ Brain::~Brain()
{ {
std::cout << "Brain has been destroyed" << std::endl; std::cout << "Brain has been destroyed" << std::endl;
} }
Brain::Brain(const Brain &other)
{
std::cout << "Brain copied" << std::endl;
}
Brain& Brain::operator=(const Brain &other)
{
std::cout << "Brain copy assignment called" << std::endl;
if (this != &other)
{
}
return (*this);
}

View File

@@ -6,7 +6,7 @@
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */ /* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2025/11/10 11:22:17 by aortigos #+# #+# */ /* Created: 2025/11/10 11:22:17 by aortigos #+# #+# */
/* Updated: 2025/11/10 11:32:41 by aortigos ### ########.fr */ /* Updated: 2025/11/10 12:43:08 by aortigos ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@@ -24,6 +24,8 @@ class Brain
public: public:
Brain(); Brain();
~Brain(); ~Brain();
Brain(const Brain &other);
Brain& operator=(const Brain &other);
}; };
#endif #endif