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!
Create Complex number using constructor:
class complex
{
private:
int real,ima;
static int count;
public :
complex (int a,int b) //constructor
real=a;
ima=b;
}
complex() //default constructor
real=0;
ima=0;
void show()
cout<< real<<"\n"< } friend complex sum(complex ,complex); ~complex () // destructor { } }; int complex :: count=15; complex sum( complex a,complex b) { complex c3; c3.real= a.real + b.real; c3.ima= a.ima + b.ima; return c3; } void main() { complex a,b,c; clrscr(); a = complex(10,12); //constructor b= complex(12,10); c=sum(a,b); c.show(); //cout < getch(); }
friend complex sum(complex ,complex);
~complex () // destructor
};
int complex :: count=15;
complex sum( complex a,complex b)
complex c3;
c3.real= a.real + b.real;
c3.ima= a.ima + b.ima;
return c3;
void main()
complex a,b,c;
clrscr();
a = complex(10,12); //constructor
b= complex(12,10);
c=sum(a,b);
c.show();
//cout < getch(); }
getch();
What is the difference between = symbol and == symbol? - The = symbol is generally used in mathematical operations. It's used to assign a value to a given variable whereas the
Add guts to VS 2008 C++ windows service Project Description: I have a shell windows32 service written in 2008 VS C++. I want the functionality part started. Need someone too
I need a project on car rental system using c programming only of college level
want the codings for these topic in ur experts minds.com
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 #include float start_point, /
Rules of Inheritance: Private members are not inherited; the members can be accessed only within its class. It cannot be used through the object. Protected members are
Program to print character array : Write a program to print the character array by using string class functions. void main() { char line[30]; int i=0; clrsc
Project Description: We are looking to have software that we will use to track employee information regarding our wellness program. We would like the system to be able to follow
How do one throw polymorphically? A: Sometimes people write code such as: class MyExceptionBase { }; class MyExceptionDerived : public MyExceptionBase { };
Aim: To implement a program for bank account using static data type. Code: class bank { static int acc_no; int acc; float b
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