Наследование классов

#include <windows.h>
#include <iostream>
#include <clocale>
using namespace std;

int main()
{
class Elcin{
public:
char name[100];
char lastname{100};
void virtual speak() {
cout << " I  Elcin!" << endl;
}
};

class Putin : public Elcin{
public:
char name[100];
char lastname{100};
void speak() {
cout << " I  Putin!";
}
};

Elcin *lider = new Elcin();
lider->speak();

Elcin *newlider = new Putin();
newlider->speak();
}


Рецензии