> > > Do you know where can I get the complex.h file, or please can you point
> > > me in the right direction? I am puzzled now.
What you posted is not a C program it is a C++ program. If you
actually use the C++ compiler it works fine. You don't need to "find
the header file" if you actually use the right compiler.
$ uname -a
OpenBSD phat.cns.ualberta.ca 3.8 GENERIC#208 amd64
$ cat > /tmp/dumbass.cc
#include <complex>
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
complex<double> a(2.0,3.0);
complex<double> b(4.0,4.0);
complex<double> c;
c = a*b;
cout << c << endl;
cout << a/b << endl;
cout << pow(a,b) << endl;
return 0;
}
$
$ g++ /tmp/dumbass.cc -o dumbass
$ /tmp/dumbass
(-4,20)
(0.625,0.125)
(-3.09898,1.17959)
$