Show: Object Pascal C++
Display Preferences

friend

From Appmethod Topics
Jump to: navigation, search

Go Up to Keywords, Alphabetical Listing Index


Category

C++ Specific Keywords

Syntax

friend <identifier>;

Description

Use friend to declare a function or class with full access rights to the private and protected members of the class, without being a member of that class. The outside class has full access to the class that declares that outside class a friend.

In all other respects, the friend is a normal function in terms of scope, declarations, and definitions.

Personal tools
In other languages