Home TechnologyProgrammingC++ Subscribe to RSS

Why Do We Need FRIEND Functions In C++?

Answer Question

4 Answers - Sort by: Date | Rating

    Friend functions are neeeded to make bridges between classes and to give permission to a normal function of accessing private data of a class.
    1 0

    Meenaxi 

    answered 3 years ago

    Hai meenaxi i have many doubt i want to become software engineeriner please help give me reply to my mail asokassspmap11@gmail.com not only meenaxi anyone can help me please
    Report
    Asokas

    Asokas

    commented 3 months ago

    Hai meenaxi i have many doubt i want to become software engineeriner please help give me reply to my mail asokassspmap11@gmail.com not only meenaxi anyone can help me please
    Report
    Saidi2009

    Saidi2009

    commented 3 months ago

    Continue asking questions. But not by mail. I can Help Only Here at BlurtIT
    Report
    Alon_nad

    Alon_nad

    commented 3 months ago

      Friend functions are non-member functions, preceded by a keyword "friend". It is used for accessing the members of a class being a non-member function.
      0 0
      Guest

      Guest 

      answered 3 months ago

        Friend Function is needed To access Private variables obviously.
        For Private data isn't accessible by non-member functions or outside classes.
        0 0

        Alon_nad 

        answered 3 months ago

        ->  Friend function normally used for accessing private member of the class.->  With the help of the Friend function we can access different class object.-> In operator overloading, with the help of the friend function we can use primitive data type      argument and user define argument at one function.-> It is not a member function of the class.-> When we want addition,subtraction... On different class we can use friend function easily.
        0 0

        Jigar 

        answered 3 months ago

        If you have any doubt please contact me on "jigar.bagadai@gmail.com"
        Report
        Jigar

        Jigar

        commented 3 months ago

        More

           
           

          Ask a Question via Twitter

          Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

          Blurtit Store

          Get T-shirts, hoodies, caps and more at the Blurtit store