Код: Выделить всё
class A {
public:
int a() {
return 6;
}
int b() {
return a() - 2;
}
};
class B: public A {
public:
int a() {
return 10;
}
};
int main() {
B x;
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/55329453/inherited-function-using-child-function[/url]
Мобильная версия