>> did u mean this
Honnestly, I don't know, I thought you were asking about input operations.
Why can't you do something like
Code:
int main()
{
using std::cout;
using std::cin;
double x,y;
cout << "enter real part:\n";
cin >> x;
cout << "enter imaginary part:\n";
cin >> y;
complex number (x,y);
cout << "enter real part:\n";
cin >> x;
cout << "enter imaginary part:\n";
cin >> y;
complex operand (x,y);
complex ans = number.multiply(operand); // or whatever math you do
ans.disp ();
}
Don't neglect the disp() function you wrote. I'm not sure what the problem is, but you are probably trying too hard to be clever.