N00B. Can I buffer cout, cout something and then cout the buffer? I've been googleing but did not find anything of this sort.
#include <iostream>
using namespace std;
int main (void)
{
cout << "cout output until this point";
string BUFFER; // I need to buffer the cout output until now.
cout << "Content-length: " + BUFFER.length(); // cout this first.
cout << BUFFER; // cout the BUFFER after the: Content-length.
cout.flush(); // Is this necessary?
return 0;
}