std::map> foo;
One line and you've set up a nontrivial data structure with automatic memory management. No macro horrors (which are a diabolical way of implementing what C++ templates do well).Since you can code like C in C++, I'm not sure why more people don't use C-with-templates as a programming style.