Files
42_INT_09_piscine_cpp/d04/ex01/Animal.cpp

47 lines
859 B
C++

#include "Animal.hpp"
/*********************************************
* CONSTRUCTORS
*********************************************/
Animal::Animal() {
type = "animal";
return;
}
Animal::Animal( Animal const & src ) {
*this = src;
return;
}
/*********************************************
* DESTRUCTORS
*********************************************/
Animal::~Animal() {
return;
}
/*********************************************
* OPERATORS
*********************************************/
Animal & Animal::operator=( Animal const & rhs ) {
if ( this != &rhs )
{
type = rhs.getType();
}
return *this;
}
std::string Animal::getType() const {return type;}
/*********************************************
* PUBLIC MEMBER FUNCTIONS
*********************************************/
void Animal::makeSound() const {
std::cout << "*sound*\n";
}