Topic: Operator ">>", "<<" with double


Author: xiaodong@otago.ac.nz
Date: Sun, 10 Oct 1993 20:09:39 GMT
Raw View
I am using Turbo C++ for Windows. I've got a linker error as follows:

Linker Error:Undefined symbol operator << [opstream near&, double] in
Module LAYER.CPP

But opstream does has a friend operator << for this as I see it from
online help:

friend Ropstream operator << (Ropstream PS, double d); // from online help.

Is this "<<" different from the previous "<<"? Anything wrong here?
Ropstream here can read and write int and char, but doesn't work to double
and float. I can't figure out the difference.

Any advice will be greatly appreciated.

Xiaodong





Author: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Date: Mon, 11 Oct 1993 06:44:03 GMT
Raw View
xiaodong@otago.ac.nz writes:

>I am using Turbo C++ for Windows. I've got a linker error as follows:

You need to tell your compiler to link in the math library.

P.S. This question is not appropriate for comp.std.c++.
     Questions like this should be posted to comp.lang.c++.

--
Fergus Henderson                     fjh@munta.cs.mu.OZ.AU