Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Using a Friend
Using a friend function is quite easy. The following example explains a friend function to access members of two classes.
class Bclass; // Forward Declaration
class Aclass
{
public :
Aclass(int v)
Avar = v;
}
friend int addup(Aclass &ac, Bclass &bc);
private :
int Avar;
};
class Bclass
Bclass(int v)
Bvar = v;
int Bvar;
int addup(Aclass &ac, Bclass &bc)
return( ac.Avar + bc.Bvar);
void main()
Aclass aobj;
Bclass bobj;
int total;
total = addup(aobj,bobj);
Pupils' heights The health visitor at a school is going to measure the heights of all pupils. For each class she makes a statistics giving the number of pupils of each height and
how to justify strategic information system
THIS PROGRAM IS TO MULTIPLY THE TWO COMPLEX NO.S GIVEN BY THE USER #include #include #include struct complex { int real; int imag; }; void main() { clrs
color representation 0,1,2,3,4,5,6,7,.......
smugglers transfer
Why many companies are switching their current business language to PHP? Where PHP basically used? PHP is rapidly gaining popularity and numerous companies are switching their
A: A class which is used to traverse through the objects maintained through a container class. There are _ve categories of iterators: output iterators, input iterators, forward ite
#questAt a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets wit
please answer the question of following Write a function that calculates the number of elapsed days between two dates. For example the days between Feb 3, 1970 and June 21, 1980? B
Write a c++ program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points c
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd