can anyone tell me the merits & demerits of friend functions?
p.s. help me
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.
Both the OP and the 1st reply could benefit from this linkhttp://www.parashift.com/c++-faq-lite/friends.html
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.)