> Dave Smith wrote:
> Most people using STL in a major way, also use typedefs so that the code
> isn't so ugly.
> typedef map<Class1,map<Class2,Class3>> myMap;
> typedef myMap::iterator mapItr;
>
> If you do that, you can swap out the container relatively easily too.
I do use typedefs to help ease this burden, although I think they
sometimes just make it harder to read later, since they add an extra "hop"
when trying to understand a type. What I'm really trying to do is
eliminate half of those lines of code just for looking up an entry in the
hierarchy. Like in PHP:
if( isset( $hierarchy[ "foo" ][ "bar" ] ) ) {
...
}
--Dave
.-----------------------------------.
| This has been a P.L.U.G. mailing. |
| Don't Fear the Penguin. |
| IRC: #utah at irc.freenode.net |
`-----------------------------------'