In case of buffered stream it said in a book that it wait until the buffer is full to write back to the monitor. For example:
cout << \"hi\";
<
You can check out the differences yourself with a small app.
#include
int main() {
std::cout<<"Start";
//std::cout<<"Start"<
Try out the difference of the two "Start" statments, then change to cerr. The difference you notice is due to buffering.
The for-statement takes about 2 seconds on my rig, you might need to tweak the i < condition on yours.