1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

friends concept

Discussion in 'C' started by ismail.tech21, Mar 13, 2008.

  1. ismail.tech21

    ismail.tech21 New Member

    Joined:
    Feb 14, 2008
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    0
    i wanted to know why it is said that friendship is not inherited, transitive, or reciprocal?
     
  2. asadullah.ansari

    asadullah.ansari TechCake

    Joined:
    Jan 9, 2008
    Messages:
    356
    Likes Received:
    14
    Trophy Points:
    0
    Occupation:
    Developer
    Location:
    NOIDA
    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.
     
  3. ismail.tech21

    ismail.tech21 New Member

    Joined:
    Feb 14, 2008
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    0
    ok thanks a lot
     

Share This Page