Mail Archives: djgpp/1996/04/01/20:50:01
"Michael Schuster" <SCHUSTER AT merlin DOT e-technik DOT uni-erlangen DOT de> writes:
>Gruess Euch!
>I' got a problem:
>I wanted to use complex numbers with a programme (see below).
>But I didn't manage to compile it.- I tried it with -lm, -lgpp, -O ...
>and have no idea what to do, although 'complex.h' is in the include
>directory.
>Any idea?
>#include <stdio.h>
>#include <math.h>
>#include<complex.h>
>Void main()
>{ Complex c1;
> c1.re=10;
>}
Problem: at least in the libg++ used by DJGPP V2, the type Complex
is *not* defined in <complex.h> (that one contains the template complex<>),
but instead in <_complex.h>, which should be <Complex.h>, but that doesn't
work on DOS.
Fix: #include <_complex.h> instead
Hans-Bernhard Broeker (Aachen, Germany)
- Raw text -