Friend Function in C++ 2nd Part

Hi friend function why we need the friend functions and friend function is a function it is not a non Member function but it is able to access the Private data of any class where it is introduced as a friend generally to access the private date of a class we should how to introduce number function means we have to use Member function but whenever we want to access the private date of a function from outside the class we should have to declare the friend function and friend functions are often be used in operator overloading concept ok they are majorly used in operator overloading concept and yesterday have given how to introduce a friend function to single class now I am going to introduce to classes one friend function ok I am going to use one friend function with two classes ok for example I am going to take two different classes ok now I want to compare which one object is big ok means which one object data is big class ok I need to classes here suppose class B now otherwise assembly class test1 actually it is called forward declaration or class declaration next another class also there class test 2 OK Here classes to do it is a test one here test on data is this i n t a public share it is a class test 2 and it is a test 1 test 1 is having data number yeah ok next wild get it is a Member function and here I am going to import the data see out enter a value in now it is going to read the value for this year I am going to use different function friend beard function because of actually here I am going to do what I am going to declare two classes on his test one tested and this one is having a and for example test is having V I want to find out which one is the biggest want this a r kester to that’s why in brackets I am going introduced both test plan and test to know it is a friend function declaration now your compiler understands what big is a function which kind of function friend function and trees having to class type of ok already said you had discussed that actually friend functions of an having objects as argument that’s why here big is having two objects mens hair right now I have used class name but from class without to declare the objects ok now it is a test 1 class later I am going for test 2 now class test 2 here IMDB next public area voice gateway function name get here get next year I want to enter the value entered the value in ok now the value also and later we have to find out the biggest once again I have to introduce the take function here also not world first of all it is a friend function that’s why first friend why it function name is what for both the meaning is what are both ok friend function declaration ok ok shout is nexa l50 to.be aeon.co where is Vikas Gupta equal function close it is a big function definition if a bigger than B output is his way otherwise BSB otherwise not to call this number function that’s why I am going to the main function and object to object function only

Speak Your Mind

*