aboutsummaryrefslogtreecommitdiff
path: root/cpp01/ex05
diff options
context:
space:
mode:
Diffstat (limited to 'cpp01/ex05')
-rw-r--r--cpp01/ex05/Brain.hpp4
-rw-r--r--cpp01/ex05/Human.cpp11
-rw-r--r--cpp01/ex05/Human.hpp13
3 files changed, 17 insertions, 11 deletions
diff --git a/cpp01/ex05/Brain.hpp b/cpp01/ex05/Brain.hpp
index 6c1f28b..81b5a07 100644
--- a/cpp01/ex05/Brain.hpp
+++ b/cpp01/ex05/Brain.hpp
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/02 12:47:22 by cacharle #+# #+# */
-/* Updated: 2020/02/02 16:28:27 by cacharle ### ########.fr */
+/* Updated: 2020/04/13 10:04:01 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -19,7 +19,7 @@
class Brain
{
- public:
+public:
std::string identify() const;
};
diff --git a/cpp01/ex05/Human.cpp b/cpp01/ex05/Human.cpp
index 4db0568..f4c0066 100644
--- a/cpp01/ex05/Human.cpp
+++ b/cpp01/ex05/Human.cpp
@@ -6,18 +6,23 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/02 12:52:38 by cacharle #+# #+# */
-/* Updated: 2020/02/02 13:08:39 by cacharle ### ########.fr */
+/* Updated: 2020/04/13 10:09:03 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include "Human.hpp"
+Human::Human()
+ : m_brain()
+{
+}
+
std::string Human::identify()
{
- return brain.identify();
+ return m_brain.identify();
}
const Brain& Human::getBrain()
{
- return brain;
+ return m_brain;
}
diff --git a/cpp01/ex05/Human.hpp b/cpp01/ex05/Human.hpp
index 6c38ee0..d7a4611 100644
--- a/cpp01/ex05/Human.hpp
+++ b/cpp01/ex05/Human.hpp
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/02 12:52:39 by cacharle #+# #+# */
-/* Updated: 2020/02/02 13:08:46 by cacharle ### ########.fr */
+/* Updated: 2020/04/13 10:08:07 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -17,12 +17,13 @@
class Human
{
- private:
- const Brain brain;
+public:
+ Human();
+ std::string identify();
+ const Brain& getBrain() ;
- public:
- std::string identify();
- const Brain& getBrain() ;
+private:
+ const Brain m_brain;
};
#endif