[Dev] Josuttis vs Musser

M. Mueller (bhu5nji) dev@trilug.org
Thu, 14 Feb 2002 05:34:49 -0500


I think I have some solid evidence to rank two STL books and it hinges on 
example variety.

The Josuttis book examples (downloaded from the web) often show that sequence 
container (vector, deque, list) elements can be directly accessed in a manner 
similar to arrays:

list<string> a;

if (a[3] == "blah") doSomething();

I have a very simple language to parse.  I am told 4 position sensitive 
things in a string.  I parse the string into a list, a,  of strings.  If 
a.size() != 4 then I ignore the statement.  Otherwise, I start analysing 
a[0]..a[3].

A quick scan of Josuttis examples suggests this approach will work.  The 
Musser et al book was not so helpful. The Musser et al book does use this 
technique and the book's formal definition of the technique is still hiding 
from me. 

These books are nearly $50 each.