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:

    “In the works of man, everything is as poor as its author; vision is confined, means are limited, scope is restricted, movements are labored, and results are humdrum.”
    —Joseph De Maistre (1753–1821)

    “A country survives its legislation. That truth should not comfort the conservative nor depress the radical. For it means that public policy can enlarge its scope and increase its audacity, can try big experiments without trembling too much over the result. This nation could enter upon the most radical experiments and could afford to fail in them.”
    —Walter Lippmann (1889–1974)

    “As the creative adult needs to toy with ideas, the child, to form his ideas, needs toys—and plenty of leisure and scope to play with them as he likes, and not just the way adults think proper. This is why he must be given this freedom for his play to be successful and truly serve him well.”
    —Bruno Bettelheim (20th century)