Не знаю, как в C++ (у Страуструпа упоминания ничего кроме public вообще не нашел), но в Delphi верно следующее:
Цитата:
|
A protected member is visible anywhere in the module where its class is declared and from any descendant class, regardless of the module where the descendant class appears. In other words, a protected method can be called, and a protected field or property read or written to, from the definition of any method belonging to a class that descends from the one where the protected member is declared. Members that are intended for use only in the implementation of derived classes are usually protected.
|
Не помню, есть ли в C++ кейворд
private.