blob: 879957f5628a1016f62a2adf89417db493854678 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
#include "Dog.h"
void Dog::sayHello() const
{
std::cout << "Hello, I am a Dog!" << std::endl;
}
Animal* Dog::clone() const
{
Animal* newObj = new Dog(*this); //copy constr of Mouse
return newObj;
}
|