This manual is The Standard C++ Library User's Guide, an introduction to the Rogue Wave implementation of the Standard C++ Library. It assumes that you are familiar with the basic features of the C++ programming language. If you are new to C++, you may want to start with an introductory text, such as The C++ Programming Language by Bjarne Stroustrup (Addison-Wesley, 1997).
Everything in the Standard C++ Library is contained in the std namespace. You must specify a using declaration or explicitly scope any name from the library; for example, using std::vector; or std::vector<int> v;. This is assumed in the examples.
This manual uses some distinctive terms and conventions. The Standard C++ Library consists mostly of class and function templates, so abbreviations for these templates are common. For example, in the iostreams part of the documentation, fstream stands for template <class charT, class traits> class basic_fstream. A slightly more succinct notation for a class template is also frequently used: basic_fstream <charT, traits>. File stream stands for the abstract notion of the file stream class template; badbit stands for the state flag ios_base::badbit.
The term algorithm indicates functions in the generic algorithms portion of the Standard C++ Library, so as to avoid confusion with member functions, argument functions, and user-defined functions.
An empty pair of parentheses () follows function names and algorithm names, so as to avoid emphasizing their arguments. An underline character _ is used as a separator in both class names and function names.
Special fonts set off class names, code samples, and special meanings, as shown in Table 2:.
Convention | Purpose | Example |
Courier |
Code, examples, function names, file names, directory names, operating system commands |
return result; |
italic |
Emphasis. New terms. Titles. |
operating system family special ending iterator User's Guide |
bold |
Emphasis. Commands from an interface. Rogue Wave product names. |
do this before that the OK button a Standard C++ Library file |
bold italic |
Class names. |
priority_queue |
This manual is organized into six parts:
Part I Introduction provides overviews of the product, the documentation that explains the product, and this manual, The Standard C++ Library User's Guide.
Part II Fundamentals explains the fundamental Standard C++ Library concepts of iterators, functions, and predicates.
The product overview noted that data structures are separated from algorithms in the Standard C++ Library.
In this manual, Part III Containers gives an overview of the data structures or containers, and devotes a chapter to describing each in detail with an example. Part IV Algorithms deals with the algorithms, devoting one chapter to the generic algorithms, and another to the generic algorithms specific to ordered collections. Within the algorithm chapters, each kind of algorithm is explained in its own section with an example and a reference to the file containing the complete source code.
Part V Special Techniques describes techniques such as using allocators, building containers and generic algorithms, using the traits technique, and dealing with exceptions.
Part VI Special Classes devotes a chapter to each of the four unique classes auto_ptr, complex, numeric_limits, and valarray.
The first time you read this manual it may be hard to know where to start. The container definitions form the heart of the library, but you can't really appreciate them without understanding the algorithms that so greatly extend their functionality. On the other hand, you can't really understand the algorithms without some appreciation of the containers.
A good approach is to read Part II Fundamentals carefully. Next, skim the definitions of the containers in Part III Containers and the descriptions of the algorithms in Part IV Algorithms, then go back and read these parts in more detail. You can then proceed to the more specialized areas of the manual.
OEM Edition, ©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.