can anyone tell me the merits & demerits of friend functions?
p.s. help me
kushal

the only time i can think of using friend functions is for operator overloading.. the rest of the time they should be avoided because they violate OOP data encapsulation.

>the rest of the time they should be avoided because they violate OOP data encapsulation.
If this is what you think, then you're not in a position to help. Those who still need to learn shouldn't be teaching.

thanxs sunnypalsingh, it was a great help...

what r merits & demerits of friend function

please tell me merits and demerits of friend function

Uh. Follow the links posted already in the thread? (Try not to be an unthinking idiot who is not inclined to read the replies already posted here.)

Uh. Follow the links posted already in the thread? (Try not to be an unthinking idiot who is not inclined to read the replies already posted here.)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.