www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/20/02:26:24

Date: Tue, 20 Aug 1996 11:40:03 +0000 ( )
From: Gurunandan R Bhat <grbhat AT unigoa DOT ernet DOT in>
To: Sxren Merser <merser AT image DOT dk>
Cc: djgpp AT delorie DOT com
Subject: Re: COMPLEX
In-Reply-To: <3218A172.34DC@image.dk>
Message-Id: <Pine.LNX.3.91.960820113557.1284B-100000@aditya.unigoa.ernet.in>
Mime-Version: 1.0


On Mon, 19 Aug 1996, Sxren Merser wrote:

> Please,what's wrong?
> The foollowing code won't compile:
>=20
> #include<iostream.h>
> #include<complex.h>
>=20
> int main()
> {
> complex c(1.1, 2.2);
> cout << c << endl;
> return;
> }
>=20
>=20
> The complier says:
>  `complex=B4 is undeclared
>=20

i can suggest two problems right away:

(1) you must #include<_complex.h> not complex.h. the underscore is there to
compensate for the fact that the correct header file is Complex.h and=20
MS-DO$ is not case sensitive. i think it is mentioned in the FAQ (sorry=20
eli ;)

(2) complex numbers are declared with a uppercase C like so:

Complex c Complex(1.1, 2.2)

i hope this helps.

gurunandan bhat
dept. of physics
goa university=20
goa, india

- Raw text -


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