answersLogoWhite

0


Best Answer

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

10y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Difference bitween various visibility modes used c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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 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.


Difference between types of displacement addressing modes?

wewe


The successful development of various modes of transportation has gradually led to the decentralization of the population?

(NovaNet answer) False


What Instead of banning modes altogether Aristotle recognized that modes could be used to produce difference emotional responses. All of the following emotions were thought to be aroused by a musical?

Jealousy.


The successful development of various modes of transportation has gradually lead to the decentralization of the population?

Nova Net answer ----> FALSE


What are the Various modes of mass communication?

Mass communication is a way for a population to communicate and relay information to a large number of people at once. Some modes include: television, Internet, telephones, and the radio.


What are the Various modes of advertisement?

Electronic media mode such as Television, Radio, Internet and Print media mode such as Newspaper, Magazine, Newsletter, Pamphlets, Leaflets etc., and Mid media mode such as Hoardings, Panes, Road divider etc. are the various modes of advertisement under Mass Media.


True or False The successful development of various modes of transportation has gradually led to the decentralization of the population?

True; ♥


What is the difference between Transverse Electrical mode and Transverse Electrical Magnetic mode?

Transverse modes are classified into different types:TE modes (Transverse Electric) no electric field in the direction of propagation.TM modes (Transverse Magnetic) no magnetic field in the direction of propagation.TEM modes (Transverse Electromagnetic) no electric nor magnetic field in the direction of propagation.Hybrid modes nonzero electric and magnetic fields in the direction of propagation.


What does the term modes of communication mean?

This is a term that can have various meanings. It's possible that it refers most commonly to various technological modes of communication:telephoneemailsocial mediawebvoiceradio or televisionIt may also refer to how communication is socially organised:committeeworkshop or atelierbroadcasttalk or speechThen it might refer to the style of the communication:question-and-answercommand