diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-04-13 10:33:05 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-04-13 10:33:05 +0200 |
| commit | 0f3240844dbd5a874e1565a988ef355ededab6a5 (patch) | |
| tree | efc1a1307863d173be17a12fbab6b84fe7d00960 /cpp01/ex05 | |
| parent | 629d52b1262879a346e9ca17567a8f483c60ba0a (diff) | |
| download | piscine_cpp-0f3240844dbd5a874e1565a988ef355ededab6a5.tar.gz piscine_cpp-0f3240844dbd5a874e1565a988ef355ededab6a5.tar.bz2 piscine_cpp-0f3240844dbd5a874e1565a988ef355ededab6a5.zip | |
Fixing cpp01
Diffstat (limited to 'cpp01/ex05')
| -rw-r--r-- | cpp01/ex05/Brain.hpp | 4 | ||||
| -rw-r--r-- | cpp01/ex05/Human.cpp | 11 | ||||
| -rw-r--r-- | cpp01/ex05/Human.hpp | 13 |
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 |
