I would suggest using the [link|http://www.boost.org|Boost] libraries, except that they use templates.