- Ron Burk. Hashing: From Good To Perfect
With these extensions, hashing becomes a suitable solution for a wider range of problems. - Ken Pugh. Questions & Answers
- John W. M. Stevens. Lexical Analysis Using Search Tries
This special type of tree is a good fit for language translation applications.
- Tim Prince. Tuning Up Math Functions
Dr. Prince shows that math functions can always be made better.
- David W. Schwartz. An Efficient Method for Optimizing Binary Trees
Seems you can always improve how you handle binary trees – David Schwartz shows another useful technique.
- Matt Weisfeld. An Alternative to Large Switch Statements
There’s more than one way to write a case switch, and some are definitely better than others when the number of cases gets large.
- Christopher Skelly. Powerful Pointers to Member Functions
So you thought you finally understood pointers in C. Now meet pointers to members in C++.
-
Bob Stout. “Olympic” Filtering for Noisy Data
Sometimes the simplest techniques yield surprisingly good results. When it comes to filtering input data on a small embedded system, simplicity is a major virtue. -
Blase B. Cindric. When the “Best” Algorithm Isn’t
Knowledge is power, particularly when choosing an algorithm. The more you know about your data, the better you can tailor how you manipulate it for better performance.
- P. J. Plauger. Standard C/C++: The Header
<string>
-
Chuck Allison. C++: The Making of a Standard
CUJ’s Chuck Allison interviews Bjarne Stroustrup on his reaction to the imminent completion of the ANSI/ISO C++ Standard. -
Marc Marini. A Class Hierarchy for Random Number Generation
Class derivation makes sense as a way of inheriting mathematical properties, not just common data.
- Dan Saks. C++ Theory and Practice:
new
anddelete
C++ has a more structured approach than C to allocating storage on the fly, but it’s not always less error prone.
- Rodney B. Doe, P.E. How to Leak Memory in C++
Warning: These are untrained professionals at work here. Do not try this at home.
- P. J. Plauger. Standard C/C++: Implementing Associative Containers
At the heart of every STL set or map lies a balanced binary tree, or at least a tree that’s almost balanced.
- Pete Becker. Questions & Answers: The Complex Evolution of
<string>
Pete describes how class string got that way, and how to avoid a few pitfalls in writing C expressions.
- James M. Curran. Creating a Word Iterator
Iterators can do more than just step through data. They can, for example, do a bit of parsing along the way.
- Thomas Becker. Smart Iterators and STL
Because they’re templates, you can smuggle added functionality into STL algorithms all sorts of ways, even through iterators.
- P. J. Plauger. Standard C/C++: Hash Tables
Hash tables didn't make it into the C++ Standard, but they're too popular to ignore.
- Radoslav Getov. Persistent Vector Iterators
Template class vector has some annoying properties. But you can hide them, and still make use of the good stuff, by deriving another template class from vector.
- P. J. Plauger. Standard C/C++: A Better List
How hard can it be to maintain a linked list? You'd be surprised. Our Senior Editor certainly was.
- Yogi Dandass. Interval Trees
We know that a tree is often a good way to represent an ordered set of values. It can also be a good way to order a set of ranges as well.
-
Scott Meyers. How Non-Member Functions Improve Encapsulation
When it comes to encapsulation, sometimes less is more. -
Douglas Reichard. Shim Classes
You don’t always have to rewrite ordinary classes as templates to get the benefits of templatization. -
P. J. Plauger. Standard C/C++: A Singly Linked List
Every design involves tradeoffs. The trick is to tradeoff using much the same principles as for related designs.
- Klaus Kreft and Angelika Langer. Effective Standard C++ Library: Are
set
Iterators Mutable or Immutable?
The C++ Standard mandates that containers such asstd::set
provide both mutable and immutable iterators. Unfortunately, mutable iterators turn out to be dangerous when used with sets.