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);
answer for tcs is working question
Define the following Window class : - integer data members, width and height - a constructor that accepts two integer parameters (width followed by height) and uses them to ini
Explain U s e r - D e f i n e d D a t a T y p es? C has Union and Structure as user-defined data types. C++ has class which looks like structure with a
The break statement The break statement, which was already covered in the switch.. case, can also be used in the loops. When a loop statement is encountered in the loops the co
Project Description: Project Description: I am seeking a programmer who will be able to design some software that will allow the user to: 1) Repeatedly monitor Nike twitter a
You are to write a C++ program which will compute the gross pay, Social Security Tax, Income Tax and net pay for an employee. The program needs to prompt for and read the employ
Program to draw a circle: int main(void) { /* request auto detection */ int gdriver = DETECT, gmode, errorcode; int midx, midy; int radius = 100;
what is c language
write a program in c/C++ using nested if statement for calculating the average marks and grades of 5 subjects
A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2
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