answersLogoWhite

0

By visibility I assume you mean member accessibility. C++ uses three levels of accessibility: private, protected and public. Private members are only accessible to the class itself and friends of the class. Protected members are the same as private members except derived classes also have access. Public members are fully accessible.

With regards inheritance, base class members with greater access than that specified are reduced to the specified access in the derived class. Thus public inheritance has no effect on base class member access. Protected inheritance reduces public members of the base class to protected members of the derived class. Private inheritance reduces both public and protected members of the base class to private members of the derived class. Private members of the base class are never inherited, thus they always remain private to the base class. Note that access to base class members can never be increased through inheritance, only reduced or kept the same. However, as well as defining an overall inheritance access, you can also specify member-wise inheritance access. Thus you could use public inheritance overall, but specify certain public members of the base class to be protected or private in the derived class and/or certain protected members of the base class to be private members of the derived class.

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

Difference between the humanities and various other modes of human inquiry and expression?

ʇ33ןɹǝʇdoɔɟןoɹoɐɯןƃɟɯoɥʇʍ ןoןoןoןoןoן ɯoɯoɯoɯoɯoɯoɯoɯooɯoɯoɯ ɹn ƃɯo ןoן


What are some important factors to consider when choosing a bike light attachment?

When choosing a bike light attachment, consider factors such as brightness level, battery life, mounting options, durability, and visibility features like flashing modes or side visibility. These factors can help ensure your safety and visibility while riding in various conditions.


What are the best features to look for in a bike light mount for optimal safety and visibility while cycling?

When choosing a bike light mount for safety and visibility while cycling, look for features such as a secure and adjustable attachment system, a bright and long-lasting light, multiple light modes for different conditions, and a design that ensures visibility from various angles.


Difference between types of displacement addressing modes?

wewe


What are the best safety features to consider when choosing a rear light for a bicycle?

When choosing a rear light for a bicycle, consider safety features like high visibility, multiple light modes, long battery life, and waterproofing. These features help increase visibility to others on the road and ensure the light remains functional in various conditions.


What are the best features to consider when choosing bicycle tail lights for safety and visibility?

When choosing bicycle tail lights for safety and visibility, consider features such as brightness, visibility angles, flashing modes, durability, and battery life. These features can help increase your visibility to others on the road and enhance your safety while cycling.


What is a list of various modes of vi?

See related link.


What are the different modes in operating system?

Operating systems of computers have various modes designed to conserve power. Two power saving modes are sleep and hibernation, which can allow for fast resumption of access.


What are the best features to consider when purchasing bicycle LED lights?

When purchasing bicycle LED lights, consider the brightness level, battery life, durability, mounting options, and visibility features like flashing modes and side visibility.


What is the difference between major and minor modes in music theory?

In music theory, major modes are generally considered to have a brighter, happier sound, while minor modes are often perceived as darker or sadder. The difference lies in the arrangement of intervals between the notes in the scale, which gives each mode its distinct emotional quality.


What are the best safety features to consider when choosing a tail light for a bike?

When choosing a tail light for a bike, consider safety features such as brightness, visibility, flashing modes, and waterproofing. Brightness ensures visibility in low light conditions, while different flashing modes can attract attention. Waterproofing protects the light from rain and other weather conditions, ensuring it remains functional.


What are the best features to look for in a bicycle rear light for optimal visibility and safety?

When choosing a bicycle rear light for optimal visibility and safety, look for features such as high brightness, multiple light modes (steady, flashing), long battery life, water resistance, easy mounting options, and a wide angle of visibility.