•A class can be declared a friend before the friend class is defined. This is because the friend declaration only needs an incomplete declaration of the friend class. An incomplete declaration informs the compiler that the friend class may be defined later.
n
nclass declaring_class
{
n //class_name is not previously declared or
defined, so
n //an incomplete declaration is used
n friend class class_name; //class_name is a friend class
n ...
n};
n