[Dev] Josuttis vs Musser

Tanner Lovelace dev@trilug.org
14 Feb 2002 13:17:50 -0500


--=-Kk2HDbopGHIP3Ns06VJU
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Replace list with vector and I think it should work.  I don't
think the operator[] is overloaded for list, because of the fact
that it's not random access.  Everything else should work, though.

Tanner

On Thu, 2002-02-14 at 05:34, M. Mueller (bhu5nji) wrote:
> I think I have some solid evidence to rank two STL books and it hinges on=
=20
> example variety.
>=20
> The Josuttis book examples (downloaded from the web) often show that sequ=
ence=20
> container (vector, deque, list) elements can be directly accessed in a ma=
nner=20
> similar to arrays:
>=20
> list<string> a;
>=20
> if (a[3] =3D=3D "blah") doSomething();
>=20
> I have a very simple language to parse.  I am told 4 position sensitive=20
> things in a string.  I parse the string into a list, a,  of strings.  If=20
> a.size() !=3D 4 then I ignore the statement.  Otherwise, I start analysin=
g=20
> a[0]..a[3].
>=20
> A quick scan of Josuttis examples suggests this approach will work.  The=20
> Musser et al book was not so helpful. The Musser et al book does use this=
=20
> technique and the book's formal definition of the technique is still hidi=
ng=20
> from me.=20
>=20
> These books are nearly $50 each.
>=20
>=20
> _______________________________________________
> Dev mailing list
> Dev@trilug.org
> http://www.trilug.org/mailman/listinfo/dev
--=20
Tanner Lovelace | lovelace@wayfarer.org | http://wtl.wayfarer.org/
--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
GPG Fingerprint =3D A66C 8660 924F 5F8C 71DA  BDD0 CE09 4F8E DE76 39D4
GPG Key can be found at http://wtl.wayfarer.org/lovelace.gpg.asc
--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--*--
 Those who are willing to sacrifice essential liberties for a little=20
 order, will lose both and deserve neither.  --  Benjamin Franklin=20

 History teaches that grave threats to liberty often come in times
 of urgency, when constitutional rights seem too extravagant to=20
 endure.  --  Justice Thurgood Marshall, 1989=20

--=-Kk2HDbopGHIP3Ns06VJU
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQA8a/9OzglPjt52OdQRAkHlAJ9jm49+t93he5i6tMQ7lZVEf3n+dACgv6z8
ozqH/CRiPNvwype+M4VSmco=
=+/gk
-----END PGP SIGNATURE-----

--=-Kk2HDbopGHIP3Ns06VJU--