d04 ex00 gestion virtual destructor et ajout messages constructors et destructors
This commit is contained in:
40
d04/ex01/WrongCat.cpp
Normal file
40
d04/ex01/WrongCat.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#include "WrongCat.hpp"
|
||||
|
||||
/*********************************************
|
||||
* CONSTRUCTORS
|
||||
*********************************************/
|
||||
|
||||
WrongCat::WrongCat() {
|
||||
type = "wrong_cat";
|
||||
return;
|
||||
}
|
||||
|
||||
WrongCat::WrongCat( WrongCat const & src ) {
|
||||
*this = src;
|
||||
return;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* DESTRUCTORS
|
||||
*********************************************/
|
||||
|
||||
WrongCat::~WrongCat() {
|
||||
return;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* OPERATORS
|
||||
*********************************************/
|
||||
|
||||
WrongCat & WrongCat::operator=( WrongCat const & rhs ) {
|
||||
WrongAnimal::operator=(rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* PUBLIC MEMBER FUNCTIONS
|
||||
*********************************************/
|
||||
|
||||
void WrongCat::makeSound() const {
|
||||
std::cout << "*miaow*\n";
|
||||
}
|
||||
Reference in New Issue
Block a user