-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAAnimal.cpp
More file actions
44 lines (38 loc) · 1.35 KB
/
AAnimal.cpp
File metadata and controls
44 lines (38 loc) · 1.35 KB
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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* AAnimal.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: zelhajou <zelhajou@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/16 00:17:40 by zelhajou #+# #+# */
/* Updated: 2024/06/16 00:47:28 by zelhajou ### ########.fr */
/* */
/* ************************************************************************** */
#include "AAnimal.hpp"
AAnimal::AAnimal()
{
type = "AAnimal";
std::cout << "AAnimal created.\n";
}
AAnimal::AAnimal(const AAnimal& other)
{
*this = other;
std::cout << "AAnimal copied.\n";
}
AAnimal& AAnimal::operator=(const AAnimal& other)
{
if (this == &other)
return (*this);
type = other.type;
return (*this);
std::cout << "AAnimal assigned.\n";
}
AAnimal::~AAnimal()
{
std::cout << "AAnimal destroyed.\n";
}
std::string AAnimal::getType() const
{
return (type);
}