If a class is declared a friend of another class, typically the classes refer to each other. The classes cannot each be defined before the other. To refer to a class, the class must have been declared. This is accomplished by a

a) Backward declaration
b) Forward declaration
c) Class definition
d) Placing a declaration of one class prior to the definition of the other.
e) None of the above. If the classes are not defined in the order grantor of friendship then friend class, this relationship is impossible.

b) Forward declaration , and d) Placing a declaration of one class prior to the definition of the other.

Part d) is how “it” is done, and part b) is what “it” is called.

Computer Science & Information Technology

You might also like to view...

A solid border around a placeholder indicates that the entire placeholder and all of its contents are selected

Indicate whether the statement is true or false

Computer Science & Information Technology

URL is the acronym for ________

Fill in the blank(s) with correct word

Computer Science & Information Technology