Sponsored Links


Results 1 to 2 of 2

Thread: what is difference between friend class and friend alternate

  1. #1
    Senior Member saneha's Avatar
    Join Date
    Apr 2011
    Posts
    266

    Spotlight what is difference between friend class and friend alternate

    Sponsored Links1



  2. #2
    Administrator Vuhelper's Avatar
    Join Date
    Apr 2011
    Posts
    9,578
    A C++ friend functions are special functions which can access the private members of a class.Logical use of them can make them useful in certain cases. For instance: when it is not possible to implement some function, without making private members accessible in them. This situation arises mostly in case of operator overloading.

    A class can also be declared to be the friend of some other class. When we create a friend class then all the member functions of the friend class also become the friend of the other class. This requires the condition that the friend becoming class must be first declared or defined (forward declaration).

    Another property of friendships is that they are not transitive: The friend of a friend is not considered to be a friend unless explicitly specified.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 12-26-2014, 09:55 PM
  2. My Christmas wish for you my friend
    By viki in forum Christmas
    Replies: 0
    Last Post: 11-27-2014, 10:31 PM
  3. A friend in need is a friend indeed
    By vustudents in forum English Fa/FSC/ICS/I.com
    Replies: 0
    Last Post: 09-07-2011, 01:44 AM
  4. Write an essay on My Crazy Friend
    By vustudents in forum Bise
    Replies: 0
    Last Post: 06-24-2011, 03:20 AM
  5. friend function in c++
    By saneha in forum C++ Programing
    Replies: 1
    Last Post: 05-02-2011, 05:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft