Родительский класс:
Код: Выделить всё
#ifndef EMPLOYEE_H
#define EMPLOYEE_H
#include
#include
#include "Date.h"
#include "Address.h"
class Employee {
public:
Employee(const std::string & name, const std::string & date): name_(name), birthday_(date), address_(nullptr) {}
virtual ~Employee();
virtual void SetAddress(const std::string &, const std::string &);
virtual void Display(std::ostream &) const;
friend std::ostream & operator
Подробнее здесь: [url]https://stackoverflow.com/questions/79796037/overriden-virtual-function-failure-while-upcasting-c[/url]
Мобильная версия