io-buffering

How do I flush the cin buffer?

How do I clear the cin buffer in C++? ...

Is file buffering by OS harmful?

I wrote a download library for my colleague. It writes downloaded data to files. My colleagues found that the file stays small for a long time, even if 100 Mb data have been downloaded. So they suggest that I should call flush() after every write() so it will not take up memory to buffer these data. But I don't think 100 Mb of virtual...