friend declaration

friend declaration

The friend declaration appears in a class body and grants a function or another class access to private and protected members of the class where the friend declaration appears.

Syntax

friend function-declaration (1)
friend function-definition (2)
friend elaborated-class-name ; (3)
friend simple-type-specifier ;

friend登录查看完整内容