In all examples that use some kind of buffering I see they use stream instead of string. How is std::ostringstream and << operator different than using string.append.
With stream you can have your class Myclass
override the <<
operation so that you can write
MyClass x;
ostringstream y;
y << x;
For append you need to have a ToString method (or something similar) since you can't override the append function of string.
For some code pieces use whatever you feel more comfortable with. Use stream for bigger projects where it's useful to be able to simply stream an object.