1
0
This repository has been archived on 2025-01-26. You can view files and clone it, but cannot push or open issues or pull requests.
CPP_Module_04/ex02/Brain.cpp

37 lines
1.4 KiB
C++
Raw Normal View History

2024-12-06 16:24:15 +01:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Brain.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/12/06 11:47:20 by adjoly #+# #+# */
/* Updated: 2024/12/06 15:53:11 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "Brain.hpp"
Brain::Brain(void) {
log("", "Brain", "", "construtor called");
}
Brain::~Brain(void) {
log("", "Brain", "", "destructor called");
}
Brain::Brain(const Brain &cpy) {
log("", "Brain", "", "copy construtor called");
*this = cpy;
}
Brain &Brain::operator=(const Brain &cpy) {
log("🟰", "Brain", "", "copy assignment construtor called");
if (this != &cpy) {
for (uint i = 0; i < 100; i++) {
this->_ideas[i] = cpy._ideas[i];
}
}
return (*this);
}