Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   friends concept (http://www.go4expert.com/forums/friends-concept-t9314/)

ismail.tech21 13Mar2008 17:48

friends concept
i wanted to know why it is said that friendship is not inherited, transitive, or reciprocal?

asadullah.ansari 13Mar2008 17:55

Re: friends concept
Actually friend concepts came into c++ from friend in real world.
I am friend of you It does not mean my kids will be friend of u. So inheritance should not work.

If class A is friend of B, Class B is friend of C then it does not mean the A is frined of C. Just map it to
real world. So transitive does not work.

suppose i trust on you that you are my friend but it does not mean that he also consider me as a friend. So reciprocol does work in a friend.

ismail.tech21 13Mar2008 17:58

Re: friends concept
ok thanks a lot

All times are GMT +5.5. The time now is 21:05.