Friend Class - Scope

Scope

The class name which is introduced in the friend class declaration its scope is not in class granting friendship and also is not the member of the class granting access. If the name of the friend class is declared before the friend class declaration then the compiler searches for the class with the same name as the friend class at the scope of friend declaration. If the name of the friend class is same as that of the enclosing class which is nested then the nested class is a friend of enclosing class.

Read more about this topic:  Friend Class

Famous quotes containing the word scope:

    Every person is responsible for all the good within the scope of his abilities, and for no more, and none can tell whose sphere is the largest.
    Gail Hamilton (1833–1896)

    Revolutions are notorious for allowing even non- participants—even women!—new scope for telling the truth since they are themselves such massive moments of truth, moments of such massive participation.
    Selma James (b. 1930)

    Each man must have his “I;” it is more necessary to him than bread; and if he does not find scope for it within the existing institutions he will be likely to make trouble.
    Charles Horton Cooley (1864–1929)