void complex<X>::imag();
#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; // Output the imaginary part cout << "The imaginary part is "<< qZ.imag() << endl; // Keep the window open cin.get(); return 0; }
© 20072024 XoaX.net LLC. All rights reserved.