November 20, 1998

Integer Affixes

You can use affixes to help the compiler figure out the correct type of a hard coded integer. The letter L affixed to a number indicates a long integer and

Elaborated Type Specifier

An elaborated type specifier is a type name preceded by one of the keywords: enum, struct, union, and class. You can use an elaborated type specifier to instantiate an object

Using bsearch the Right Way

Standard C defines the function bsearch, which performs a binary search on an array of elements. The function bsearch is very efficient, but it works only on sorted arrays. You

The Perils of a Container’s Reallocation

When a container reallocates its elements, their addresses change correspondingly. Consequently, the values of existing iterators are invalidated: #include #include using namespace std;void main() { list payroll; payroll.push_back(5000.00); list::iterator p

Pointers to Members of a Template Class

You can define a pointer to a class template member. For example, you can use the specialization vector: typedef void (vector< int >::*v_vi_szt) (size_t); // v_vi_szt is used to hide