Have you heard about open_memstream()? This is a nice addition of POSIX 2008. Good little step towards bringing down the number of different string classes in an average C/C++ program.