Mark's STL Page



Contents: | Huh? What's STL? | STL Web Resources | STL FAQ |

I want to provide my own suggestions and help for STL users at this site as well as provide access to STL documentation on the internet.

I copied the format and some source for this page from Adrian Nagle's VIM page because he did a good job and I don't do much HTML.


Huh? What's STL?

The Standard Template Library (STL) is a set of high-performance template classes designed to provide programmers with data storage mechanisms for whatever needs the project may have. More information can be found in the web resources listed below.


STL Resources on the Web


STL FAQ

Here are some issues (and solutions) I ran into when starting with the STL.

Where are the header files located?

If you are having troubles including STL header files there are a couple things which may be wrong. First, make sure you do not include a ".h" extension in the include statement. STL files do not have this extension. If you are still having troubles, make sure your header file search path includes the location of the STL header files. The location of these could be different on every system but if you search your filesystem for "stack", "map", "queue", or STL types you should be able to find their location. Remember, the header files may not have ".h" at the end, so don't include that in your search.

Why am I getting The text "<" is unexpected. "stack" may be undeclared or ambiguous.?

The STL is constructed using namespaces to reduce name collisions. In order to access the namespace, you must add one of the following lines prior to where the STL class is used:
Note, the stack class is used in these examples.

using namespace std;
or
using std::stack;


This page is VIM powered!  Click here for the VIM home page. Return to Mark's homepage

( [ Click here to reveal. ] [ Click here to reveal. ] )
Last modified: 2003-09-10 22:39:51 Central Standard Time