title: std::cout, ostream and other kinds of getting output stream
body: <p>In my project (Unreal Engine 4) I don't have an output stream - instead of this I can communicate via UE_LOG function, which works pretty much similar to <code>printf()</code>. The problem is that I just made a .dll library (without Unreal includes) which I want to communicate through the <code>iostream</code>. My idea is - inside .dll library I use standard <code>cout</code> to write messages into ostream, I use all of it in Unreal Engine functions, where I grab <code>ostream</code> in form of string and output it into UE_LOG function.</p>
  
  <p>Problem is I always treated <code>std::cout</code> as a part of magic, without thinking what is really inside (I am pretty sure most of us did). How I can handle this? Easy ways won't work (like grabbing <code>stringstream</code> and outputing it into UE_LOG).</p>