Article ID: 154539 - Last Review: November 18, 2003 - Revision: 2.0 PRB: Including STL.H Causes Compiler ErrorsThis article was previously published under Q154539 On This PageSYMPTOMS
Programs that include "STL.H" generate different compiler errors, depending
on the STL template class you try to instantiate. The compiler errors are
all in STL header files. The sample code below illustrates some of these
errors.
CAUSE
STL.H contains typographical and syntax errors.
RESOLUTION
STL.H was included with Visual C++ 4.2 by mistake. It is not part of the
ANSI standard for Standard C++ Libraries and should not be used. Instead,
include the individual header files associated with the particular STL
component(s) the program is using. The sample code below, for example, will
compile and run correctly if "#include <stl.h>" is changed to "#include
<vector>."
STATUS
This behavior is by design.
MORE INFORMATIONSample CodeAPPLIES TO
| Article Translations
|

Back to the top
