Define private, protected and public access control - C++

Define private, protected and public access control.

Private :
Private is the default access specifier for every declared data item in a class. Private data belongs to the same class in which it is created and can only be used by the other members of the same class.

Protected :
When a data item is declared as protected it is only accessible by the derived class member.

Public :
Public allows to use the declared data item used by anyone from anywhere in the program. Data items declared in public are open to all and can be accessed by anyone willing to use their values and functions they provide.
What is Turbo C++?
Turbo C++ - Turbo C++ provides an environment called IDE (Integrated Development...
How to control the number of chars read in a string by using scanf()? - C++
How to control the number of chars read in a string by using scanf()? - Doing this limits the length of the characters that will be read by scanf() to 20 characters.....
How to detect an end of a file? - C++
How to detect an end of a file? - You can either use the ifstream object ‘fin’ which returns 0 on an end of file...
Post your comment
Discussion Board
class
gal bat...awesome...outstanding...subrb
harman 08-9-2016