473,563 Members | 2,556 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is this a STLport bug

vc8 + STLport 5.1.3:

cout << fixed << numeric_limits< double>::max();

It result a runtime error.

Sep 22 '07 #1
5 1509
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...

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Sep 22 '07 #2

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_li mits<double>::m ax() / 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
Sep 22 '07 #3
On Sep 23, 12:10 am, "BobR" <removeBadB...@ worldnet.att.ne twrote:
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_li mits<double>::m ax() / 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
Thank you.
But if I use vc8's STL it will works fine :(

Sep 22 '07 #4
On Sep 22, 10:27 pm, "Victor Bazarov" <v.Abaza...@com Acast.netwrote:
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...

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Thank you.
My question was just about the bug, and was there a bug,
but not about debug.

Sep 22 '07 #5
On 2007-09-22 10:46, Aman JIANG wrote:
vc8 + STLport 5.1.3:

cout << fixed << numeric_limits< double>::max();

It result a runtime error.
It works just fine if you use the STL that comes with VS, so the bug
must be with STLPort, for more information ask in a group discussing
STLPort.

--
Erik Wikström
Sep 22 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3251
by: Gary | last post by:
I am trying to compile the STLPORT 4.5.3 using g++ 3.3 compiler on sun. I have modified the stl_gcc.h file to point to the correct include path for the compiler. I am getting the following errors: In file included from /opt/nortel/gcc-3.3/backward/iostream.h:31, from /export/home/rch034/garyla/stlport/wrap_std/h/iostream.h:5, from...
4
1666
by: Icosahedron | last post by:
I'm sure it's been done. I'm sure that I'm an idiot for even asking the question, but has anyone been successful in getting Comeau 4.3.0.1 to compile STLPort, or even use STLPort in a program (using the MSVC7 backend, I should state)? There doesn't seem to be any out of the box support for Comeau on Win32/MSVC7 in STLPort, but that's...
1
1944
by: pervinder | last post by:
Hi, When i link a C++ test app with stlport, it throws some errors on AIX like Linking ../../output/AIX_32/bin/test "/hm/test/stlport/stl/_fstream.h", line 30.11: 1540-0836 (S) The #include file <stl/_streambuf.h> is not found. "/hm/test/stlport/stl/_fstream.h", line 34.10: 1540-0836 (S) The #include file <stl/_istream.h> is not found....
2
2034
by: programmer_pete | last post by:
I am trying to switch to STLPort 4.6.2 from the MSVC STL. My project uses Spirit 1.6.0 and MSVC++ 6. I have configured STLPort as follows: #define _STLP_NO_OWN_IOSTREAMS 1 #define _STLP_USE_OWN_NAMESPACE 1 #define _STLP_REDEFINE_STD 1 In other words, STLPort is configured to used MSVC's iostreams.
1
1992
by: Boris | last post by:
Hi, I'm using STLport-4.5.3 with Visual C++ 6.0 on Windows XP. It seems, the module built requires MSVCP60.DLL - which (mostly) contains Streams implementation by Microsoft. So, STLport falls back on Microsoft implementation of STL for Streams support. That Microsoft DLL is ~ 500K in size...because my app is deployed over Internet, these...
7
1901
by: Gernot Frisch | last post by:
Hi, we have to use stlport here, but With a code like this: void DoSomething(int english_version) { // make no use of english_version }
1
6310
by: PangFromChina | last post by:
Platform:window 2000 professional, VC++6.0 +SP5 STLport: STLport 5.0.2 While test STLport following "STLport README for Microsoft Visual C++ compilers." of README.msvc(readme.txt), there is a error:NMAKE: fatal error U1077: 'cl': return code '0x2'stop. I can build STLport without any error but a warning, after buiding I test it, a error...
2
3054
by: Artur Bac | last post by:
I got a problem with eVc4 i STLPort and i dont known why c:\stlport-5.0.2\stlport\stl\_construct.h(115) : error C2665: 'new' : none of the 2 overloads can convert parameter 2 from type 'struct ns::CPointT<short*' c:\stlport-5.0.2\stlport\stl\_vector.h(351) : see reference to function template instantiation 'void __cdecl...
0
2334
by: francois.cppdevs | last post by:
Hi C++ supporters I just wanted to let you know that STLport 5.1.0 has been released, it is available here: https://sourceforge.net/projects/stlport/ Since 5.0 this library implements some interesting (and original I hope) features like: - template expression for string concatenation (activable through
1
7631
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7943
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6238
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5479
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5204
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3631
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2077
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
912
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.