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();
Node *orderedInsert(Node *p, int newval); /* Allocates a new Node with data value newval and inserts into the ordered list with first node pointer p in such a way that the data va
Ask question #MA company is rewriting its payroll system to move it from an old mainframe to a distributed mini-computer/PC-based networked setup. No new functionality will be adde
Project Description: Need to develop an expert advisor base on sthocastic oscilator with my own setting.. Very basic touch line OB/OS only but on my setting n condition Skill
Should I call a destructor explicitly on a local variable?
Explain the working of strcmp and strcat Function? strcmp() : This function is meant to use to compare two strings. The strcmp() function acknowledge two strings as argument
world wide web
This is what I need help with. "Create a program creates an interface allowing the user to select from some other programs I have made one being a money converter and the other ca
A: No. While realloc() need to copy the allocation, this uses a bitwise copy operation, that will tear several C++ objects to shreds. C++ objects must be allowed to copy t
A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci
C Program for STRING ADDRESS #include stdio.h> #include conio.h> #include string.h> void main() { char *name; int length; cha
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