complex<X>& complex<X>::operator=(const complex<X>& kqrZ);
#include <complex>
#include <complex> #include <iostream> int main() { using namespace std; // Create a complex number complex<double> qZ(2.0, 4.0); cout << "Complex Number : "<< qZ << endl; // Create a second complex number and assign it complex<double> qZ2(5.2, 1.3); qZ = qZ2; cout << "After the first assigment : "<< qZ << endl; // Make a second assignment to a "real" number qZ = 3.14; cout << "After the second assigment : "<< qZ << endl; // Keep the window open cin.get(); return 0; }
© 20072024 XoaX.net LLC. All rights reserved.