Bob Beck wrote: >>>>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) > $ > > >
Hello again. Thank you very much to all for your responses. I seems that It is a good time to learn the C++ thing. Some time ago with no too much free time, I tried it with no luck. I found object oriented programming very strange. Anyway, It seems that if I want to make NEC compile under OpenBSD, I will have to do some hard work ;-) I think it will be a good and interesting programming experience. Thank you very much. Ramiro. EA1ABZ.