IT SOLUTIONS
Your full service technology partner! 
+Expand
   ► KBTo/From GuidesC++  Print This     

Member Visibility (C++ and ASP Classic Cross Reference Guide)

By Mike Prestwood

C++ versus ASP Classic: A side by side comparison between C++ and ASP Classic.

 
OOP Basics
 

Some languages support object-based concepts such as Paradox, Access, and VB Classic. Other languages have OO extensions and fully support object orientation in a hybrid fashion (such as C++ and Dephi for Win32). Finally, some lanages such as C#, VB.Net, Prism, and Java are entirely written in OO. Meaning, every line of code written must occur within a class).

Member Visibility

[Other Languages] 

General Info: Class Visibility Specifiers

In OOP languages, members of a class have a specific scope that indicates visibility. Standard visibility includes private, protected, and public. Private members are usable by the defining class only (fully encapsulated). They are invisible outside of the class except by friendly classes. Protected members are usable by the defining class and descendant classes only (plus friendly classes). Public members are usable wherever its class can be referenced.

Languages Focus

Traditional member visibility specifiers for fully OOP languages are private, protected, and public. Many modern OOP languages implement additional member visibilities.

Additional member modifiers are documented under the Member Modifiers topic.

C++: 

C++ implements class and member visibility specifiers traditionally. Note the colon at the end of each visibility specifier and the semi-colon at the end of the class (the end of the statement).

Syntax Example:
class Cyborg: Public AParentClass {
public:
 
protected:
 
private:
};
ASP Classic:   Private, Public

The member visibility modifiers are Private and Public. If not specified, the default is Public. Private and Public have the usual meaning. Private members are visible only within the class block. Public members are visible within the class and outside of the class.

Syntax Example:
Class Cyborg
  Private FSerialNumber  
  Public FCyborgName
  
  Public Function IntroduceYourself() 
Response.Write("Hi, I do not have a name yet.")
End Function
End Class












Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2025 Prestwood IT Solutions.   [Security & Privacy]