This repository has been archived on 2025-01-26. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
CPP_Module_04/ex02/Brain.cpp
T
2024-12-06 16:24:15 +01:00

37 lines
1.4 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* 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);
}