-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWrongCat.cpp
49 lines (40 loc) · 1.55 KB
/
WrongCat.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* WrongCat.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: wcorrea- <wcorrea-@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/07/19 15:56:12 by wcorrea- #+# #+# */
/* Updated: 2023/07/19 16:42:32 by wcorrea- ### ########.fr */
/* */
/* ************************************************************************** */
#include "WrongCat.hpp"
// Constructors
WrongCat::WrongCat(void)
{
std::cout << "WrongCat default constructor called" << std::endl;
this->type = "WrongCat";
}
WrongCat::WrongCat(WrongCat const &src) : WrongAnimal(src)
{
std::cout << "WrongCat copy constructor called" << std::endl;
*this = src;
}
WrongCat::~WrongCat(void)
{
std::cout << "WrongCat destructor called" << std::endl;
}
// Operators
WrongCat &WrongCat::operator=(WrongCat const &src)
{
std::cout << "WrongCat assignation operator called" << std::endl;
if (this == &src)
return (*this);
return (*this);
}
// Member functions
void WrongCat::makeSound(void) const
{
std::cout << "WrongCat: Meow meow!" << std::endl;
}