I tried using unistd.h sleep(x) on Linux and if the stream isn't explicitly flushed, it'd hang up for the defined time and then output all cout statements at once. On other hand, when using Windows.h header file on my Windows OS, it'd actually wait that amount of time and output each cout statement as if they were individually flushed.
#include <iostream>
#include <Windows.h>
using namespace std;
int main()
{
cout << "Test";
Sleep(2000);
cout << "Test";
}
So, is it implemented or am I wrong about this?