Victor Bazarov wrote in message...
> Aman JIANG wrote:
> > vc8 + STLport 5.1.3:
> >
> > cout << fixed << numeric_limits<double>::max();
> >
> > It result a runtime error.
>
> Have you tried debugging it? I don't have STLport (nor do I
> intend to use it) but it should be fairly easily to step into
> the operator<<, I would think... VC++ has a very good debugger
> it would be a shame not to use it...
>
It has nothing to do with STL/Standard C++ Lib. It's a bug in MSVCRT.DLL.
The biggest number you can print out (directly) on window$ in 'fixed' format
is:
double tmp( std::numeric_limits<double>::max() / 1.0e+276 );
std::cout << std::fixed << tmp;
Change that magic-number to '275' and BANG.
The whole '*.max()' will print on GNU/Linux (and probably others).
[ those were my findings on an Pentium4/win98se/GCC(MinGW)3.3.1. ]
--
Bob R
POVrookie