adsense


Thursday, 26 November 2015

C++ LANGUAGE ACESS LABELS ENFORCE ABSTRACTION

COMPUTER LANGUAGES HTML,C,C++.JAVA,.NET AND MULTIMEDIA basics and programs click home button



C++ LANGUAGE ACESS LABELS ENFORCE ABSTRACTION






Access Labels Enforce Abstraction 


In C++, we use access labels to define the abstract 
interface to the class. A class may contain zero or 
more access labels: 

• Members defined with a public label are accessible 
to all parts of the program. The data-abstraction 
view of a type is defined by its public members. 

• Members defined with a private label are not 
accessible to code that uses the class. The private 
sections hide the implementation from code that uses 
the type. 

There are no restrictions on how often an access 
label may appear. Each access label specifies the 
access level of the succeeding member definitions. 
The specified access level remains in effect until 
the next access label is encountered or the closing 
right brace of the class body is seen. 



No comments: