template <class X> complex<X>::complex();
#include <complex>
template<class X> complex(const X& kxrReal = 0, const X& kxrImag = 0); template<class X> complex(const complex<X>& kqrZ);
#include <complex> #include <iostream> int main() { using namespace std; // Create a complex number complex<int> qComplex(2, 4); cout << "Complex Number : "<< qComplex << endl; // Create a complex number with the copy constructor complex<int> qCopy(qComplex); cout << "Copy of Complex Number : "<< qCopy << endl; // Keep the window open cin.get(); return 0; }
© 20072024 XoaX.net LLC. All rights reserved.