42_CPP04/ex00/src/Dog.cpp
Camille Chauvet 7a64f69133 add ex00
2023-08-09 14:50:52 +00:00

31 lines
397 B
C++

#include "Dog.hpp"
#include "Animal.hpp"
#include <iostream>
Dog::Dog()
{
this->type = "Dog";
std::cout << "Dog()" << std::endl;
}
Dog& Dog::operator=(const Dog& src)
{
this->type = src.type;
return *this;
}
Dog::~Dog()
{
std::cout << "~Dog()" << std::endl;
}
Dog::Dog(const Dog& src): Animal()
{
*this = src;
}
void Dog::makeSound() const
{
std::cout << "Ouaf ouaf !" << std::endl;
}