Mail Archives: djgpp/2000/03/19/19:32:32
roadraat AT aol DOT com (RoadRaat) wrote:
> This code is taken from Ivor Horton's Beginning C++ from Wrox. He says that
> 'fixed' and 'scientific' come from iostream. I had thought that they came from
> iomanip, so I was going crazy trying to verify that I had installed everything
> correctly. I have the headers alright, but iostream doesn't seem to function
> the way my textbook leads me to expect.
According to The C++PL 3rd Ed. the standard manipulators are defined
in <ios>, <istream>/<ostream>/<iostream> and <iomanip> depending what
they operate on. My interpretation is that fixed and scientific
belong in <ios>, but GCC does not have that header. :(
> >> Why won't it work with DJGPP?
> >
> >Most likely this feature has not yet been implemented in GCC.
>
> If that is true, then I will stop tearing out my hair presuming that I'm simply
> doing something wrong. So I can conclude the following? DJGPP will NOT yet
> allow me to set a format just by typing 'fixed', like in my first example? I
> MUST use the old way of typing 'cout.setiosflags(ios::fixed)'?
Almost. You can conclude that GCC will not yet allow you to set a
format with fixed. DJGPP does not provide the C++ library
implementation.
As a workaround, you could write your own versions of fixed and
scientific based on the manipulators for hex/oct/dec from <iostream.h>
> I really began to suspect that when I started looking at the iostream file
> itself, which merely forwards to iostream.h, the OLD ANSI standard. Am I
> understanding this correctly?
Yes I think so. If you report this to the relevant GCC mailing list
(or look in the GCC FAQ) you should get a more definitive answer.
- Raw text -