First a short question: is there a class like MemStream, but which owns it's memory, grows with every Put and has a capacity. Basically a Vector<char> but with all the PutNN variants so I can add ints and doubles to it?
StringStream. Frankly, it is very common, used much more frequently than MemStream.