+ 8

Can anyone tell me the difference b/w access specifier and visiblity mode

30th Jun 2019, 12:45 AM
Shristi Singh
Shristi Singh - avatar
2 Answers
+ 4
Difference between access specifier and visibility mode in c++. Here's what you are looking for: ➡Visibility Mode: It is used in C++ to show the relationship between the base and the derived class. It specifies what the derived class can derive from the base class. It is therefore used in inheritance. ➡Access Specifiers: It is used to define the behaviour of the variable and function in a class. It tells which object can access the variable and function. It is public, private and protected. It is therefore used in class. Hope this clears your doubt.Thanks
30th Jun 2019, 12:57 AM
Asmit joy
Asmit joy - avatar
+ 1
Public - The members declared asPublic are accessible from outside the Class through an object of theclass. Protected - The membersdeclared as Protected are accessible from outside the classBUT only in a class derived from it.Private - These members are only accessible from within the class.
4th Jul 2019, 8:08 AM
Shristi Singh
Shristi Singh - avatar