Код: Выделить всё
class Student{
public:
string name;
string address;
};
class Instructor: public Student {
public:
string name;
string address;
};
int main() {
Instructor Z;
Z.name = "Zombie";
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/78533414/why-is-there-no-error-if-a-class-defines-a-member-with-the-same-name-and-type-as[/url]
Мобильная версия