Why so many people use flush() member function for std::ostringstream objects in situations like this:
#include <iostream>
#include <sstream>
int main()
{
float f = 12.345f / 100;
std::ostringstream ios;
ios << f;
ios.flush();
std::cout << f << " : " << ios.str() << std::endl;
}
Output without this call will be the same.
So, why? And when should i use flush() member function?