Re: re[2]: [SLE] Visual C++
Alle 19:55, giovedì 16 maggio 2002, Greg Freemyer ha scritto:
You guys are confusing the STL with the compiler.
When porting a program from a compiler to another, you have much less problem with the compiler itself than with the libraries you need, and that sometimes are not so standard and maybe different.
#include <vector> is required by the STL and has been for years.
The STL is basically a set of header files, none of which have a .h extension.
Yes, standard practice for header files is to use a .h extension, but the STL does not do so.
I imagine this was done to avoid naming conflicts with other header files.
The only difference between .h header and "not .h" headers is that the second is put in the std namespace, afaik. That is a big different for project which use namespaces. Mine was quite small, so I did not use them, but the VC++ compiler was not very satisfied with it. Praise
Another big problem is with threaded applications. Many libraries are not threadsafe. On 16 May 2002 at 21:52, Praise wrote:
Alle 19:55, giovedì 16 maggio 2002, Greg Freemyer ha scritto:
You guys are confusing the STL with the compiler.
When porting a program from a compiler to another, you have much less problem with the compiler itself than with the libraries you need, and that sometimes are not so standard and maybe different.
#include <vector> is required by the STL and has been for years.
The STL is basically a set of header files, none of which have a .h extension.
Yes, standard practice for header files is to use a .h extension, but the STL does not do so.
I imagine this was done to avoid naming conflicts with other header files.
The only difference between .h header and "not .h" headers is that the second is put in the std namespace, afaik. That is a big different for project which use namespaces. Mine was quite small, so I did not use them, but the VC++ compiler was not very satisfied with it.
Praise
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com
-- Jerry Feldman Enterprise Systems Group Hewlett-Packard Company 200 Forest Street MRO1-3/F1 Marlboro, Ma. 01752 508-467-4315 http://www.testdrive.compaq.com/linux/
On 16 May 2002, Praise wrote:
The only difference between .h header and "not .h" headers is that the second is put in the std namespace, afaik.
NO. That's completely not true. ISO C++ does _not_ have ANY
headers that end with ".h". e.g, iostream, not iostream.h.
vector, not vector.h
Pages and Pages of Documentation:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/ht...
http://www.cuj.com/articles/1999/9907/9907i/9907i.htm?topic=articles
http://www.cuj.com/roundup/a.htm
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q154419
http://docs.sun.com/htmlcoll/coll.32.8/iso-8859-
1/CPPMIGRATE/Ch4.Libs.html
http://oakroadsystems.com/tech/cppredef.htm
http://www.comp.leeds.ac.uk/so21/ref/std_c++.html
http://groups.google.com/groups?hl=en&lr=&ie=UTF8&oe=UTF8&threadm=8jhg3o%24rid1%40bornews.borland.com&rnum=1&prev=/groups%3Fq%3Dc%252B%252B%2Bheaders%2Bwithout%2B%2522.h%2522%26hl%3Den%26lr%3D%26ie%3DUTF8%26oe%3DUTF8%26selm%3D8jhg3o%2524rid1%2540bornews.borland.com%26rnum%3D1
http://groups.google.com/groups?hl=en&lr=&ie=UTF8&oe=UTF8&threadm=366586e5.14229850%40news.which.net&rnum=5&prev=/groups%3Fq%3Dc%252B%252B%2Bheaders%2Bwithout%2B%2522.h%2522%26hl%3Den%26lr%3D%26ie%3DUTF8%26oe%3DUTF8%26selm%3D366586e5.14229850%2540news.which.net%26rnum%3D5
http://groups.google.com/groups?hl=en&lr=&ie=UTF8&oe=UTF8&threadm=369d414e.256702760%40netnews.worldnet.att.net&rnum=8&prev=/groups%3Fq%3Dc%252B%252B%2Bheaders%2Bwithout%2B%2522.h%2522%26hl%3Den%26lr%3D%26ie%3DUTF8%26oe%3DUTF8%26selm%3D369d414e.256702760%2540netnews.worldnet.att.net%26rnum%3D8
"New-style headers should work correctly (e.g., <iostream>
instead of
"Karol Pietrzak"
ISO C++ does _not_ have ANY headers that end with ".h". e.g, iostream, not iostream.h. vector, not vector.h
I strongly suggest you read the C++ standard (ISO/IEC 14882:1998(E).
The following is a copy of the section D.5:
************************************************************************
D.5 Standard C library headers
For compatibility with the Standard C library, the C++ Standard
library provides the 18 C headers, as shown in Table 100:
Table 100 C Headers
Hi, any website where I can read this ISO C++ standard? Regards, Verdi
"Karol Pietrzak"
writes: ISO C++ does _not_ have ANY headers that end with ".h". e.g, iostream, not iostream.h. vector, not vector.h
I strongly suggest you read the C++ standard (ISO/IEC 14882:1998(E). The following is a copy of the section D.5:
************************************************************************ D.5 Standard C library headers
For compatibility with the Standard C library, the C++ Standard library provides the 18 C headers, as shown in Table 100:
Table 100 C Headers
************************************************************************ To avoid misunderstanding, I also include the note 160:
: The ".h" headers dump all their names into the global namespace, : whereas the newer forms keep their names in namespace : std. Therefore, the newer forms are the preferred forms for all uses : except for C++ programs which are intended to be strictly : compatible with C.
-- Alexandr.Malusek@imv.liu.se
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com
Also check the archives at http://lists.suse.com
-- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net
Verdi March
any website where I can read this ISO C++ standard?
I don't think it's available online. It can be purchased and downloaded from the Internet. I paid a special price 18 USD, ordinary price seems to be 245 USD. I suggest you try http://webstore.ansi.org/ and search for ISO 14882. ISO (http://www.iso.org/) seems to offer only the more expensive version. Its copyright : No part of this publication may be reproduced in any form, including : an electronic retrieval system, without the prior written permission : of ITI. isn't very helpful. I broke it just by listing the 18 C headers in my message ... -- Alexandr.Malusek@imv.liu.se
participants (5)
-
Alexandr Malusek
-
Jerry Feldman
-
Karol Pietrzak
-
Praise
-
Verdi March