www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/01/20:50:01

Xref: news2.mv.net comp.os.msdos.djgpp:2332
From: Broeker AT axpmgr DOT physik DOT rwth-aachen DOT de (Hans-Bernhard Broeker)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Complex numbers
Date: 1 Apr 96 13:50:45 GMT
Organization: RWTH -Aachen / Rechnerbetrieb Informatik
Lines: 28
Message-ID: <Broeker.828366645@axpmgr>
References: <MAILQUEUE-101 DOT 960401131654 DOT 288 AT merlin DOT e-technik DOT uni-erlangen DOT de>
NNTP-Posting-Host: axpmgr.physik.rwth-aachen.de
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

"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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019