diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-12-11 12:11:50 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-12-11 12:11:50 +0100 |
| commit | c10aa969c60cedef893146307fa319250901465a (patch) | |
| tree | e3dfa785191047ee8e2ed533f963fe7c5cd7aacf /cpp04/ex01/PlasmaRifle.cpp | |
| parent | 6169d697a5be59426d034b878bffc848de49491d (diff) | |
| download | piscine_cpp-c10aa969c60cedef893146307fa319250901465a.tar.gz piscine_cpp-c10aa969c60cedef893146307fa319250901465a.tar.bz2 piscine_cpp-c10aa969c60cedef893146307fa319250901465a.zip | |
Fixing cpp04 according to correction
Diffstat (limited to 'cpp04/ex01/PlasmaRifle.cpp')
| -rw-r--r-- | cpp04/ex01/PlasmaRifle.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/cpp04/ex01/PlasmaRifle.cpp b/cpp04/ex01/PlasmaRifle.cpp index fc6bddd..df06864 100644 --- a/cpp04/ex01/PlasmaRifle.cpp +++ b/cpp04/ex01/PlasmaRifle.cpp @@ -6,7 +6,7 @@ /* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/14 13:07:24 by charles #+# #+# */ -/* Updated: 2020/11/12 13:35:36 by cacharle ### ########.fr */ +/* Updated: 2020/12/11 10:56:23 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -28,3 +28,22 @@ void PlasmaRifle::attack() const { std::cout << "* piouuu piouuu piouuu *" << std::endl; } + +/******************************************************************************/ + +ThisIsNotAPlasmaRifle::ThisIsNotAPlasmaRifle() : AWeapon("Not a Plasma Rifle", 5, 21) {} + +ThisIsNotAPlasmaRifle::ThisIsNotAPlasmaRifle(ThisIsNotAPlasmaRifle const& other) : AWeapon(other) {} + +ThisIsNotAPlasmaRifle& ThisIsNotAPlasmaRifle::operator=(ThisIsNotAPlasmaRifle const& other) +{ + AWeapon::operator=(other); + return *this; +} + +ThisIsNotAPlasmaRifle::~ThisIsNotAPlasmaRifle() {} + +void ThisIsNotAPlasmaRifle::attack() const +{ + std::cout << "* not piouuu piouuu piouuu *" << std::endl; +} |
