This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/cplbexam/complex/pubfun/assign.cpp

14 lines
355 B
C++

#include <complex.h>
void main( void ) {
Complex a (24, 27), p, q;
double b = 45.6;
p = a; // Copy the values of a into p
q = b; /* Set the real component of q to b and the
imaginary component be zero */
cout << p << endl;
cout << q << endl;
}