Mail Archives: djgpp/1996/08/20/02:26:24
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 -