What is friend class?

Go down

What is friend class? Empty What is friend class?

Post  skyboard on Sat Sep 17, 2011 10:04 pm

In object-oriented programming to allow access to "private" or "protected" data of a class in another class, the latter class is declared as a friend class.


//A friend class can be declared as:
class A
friend class B;


Posts : 31
Join date : 2011-09-03

View user profile

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum