d04 ex02 dynamic_cast dans main pour ne pas avoir une metode pure brain dans animal au cas ou en correction...

This commit is contained in:
Hugo LAMY
2022-03-16 12:42:13 +01:00
parent 1bae971027
commit bac6161af8
8 changed files with 16 additions and 12 deletions

View File

@@ -17,7 +17,7 @@ public:
virtual void makeSound() const = 0;
std::string getType() const;
virtual Brain * getBrain() const = 0;
// virtual Brain * getBrain() const = 0;
protected:
std::string type;

View File

@@ -19,7 +19,7 @@ public:
Cat( Cat const & src );
~Cat();
Cat & operator=( Cat const & rhs );
Cat & operator=( Animal const & rhs );
// Cat & operator=( Animal const & rhs );
void makeSound() const;

View File

@@ -17,7 +17,7 @@ public:
Dog( Dog const & src );
~Dog();
Dog & operator=( Dog const & rhs );
Dog & operator=( Animal const & rhs );
// Dog & operator=( Animal const & rhs );
void makeSound() const;
Brain * getBrain() const;