complex<float>::complex(float fReal = 0, float fImag = 0);
#include <complex>
complex(const complex<float>& kqrZ); complex(const complex<double>& kqrZ); complex(const complex<long double>& kqrZ);
#include <complex>
#include <iostream>
int main()
{
using namespace std;
// Create a complex number
complex<float> qComplex(2.0, 4.0);
cout << "Complex Number : "<< qComplex << endl;
// Create a complex number with the copy constructor
complex<float> qCopy(qComplex);
cout << "Copy of Complex Number : "<< qCopy << endl;
// Keep the window open
cin.get();
return 0;
}
© 20072025 XoaX.net LLC. All rights reserved.