31 lines
397 B
C++
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;
|
||
|
}
|