cpp/CPP04/ex01/Brain.cpp
2024-12-04 17:29:31 +01:00

22 lines
364 B
C++

#include "Brain.hpp"
Brain::Brain() {
std::cout << "Brain created" << std::endl;
}
Brain::~Brain() {
std::cout << "Brain destroyed" << std::endl;
}
Brain::Brain(const Brain &other) {
*this = other;
}
Brain& Brain::operator=(const Brain &other) {
if (this != &other) {
for (int i = 0; i < 100; i++)
this->ideas[i] = other.ideas[i];
}
return *this;
}