Streaming output to save things
<p>I would like to &lt;&lt; stream to save all inputs from console into a file
Here is how I tried</p>

<pre><code>ofstream of("file.txt");
while(1)
{
   string str;
   cin&gt;&gt;str;
   of&lt;&lt;str;   
}
</code></pre>

<p>I don't see the non-English characters in the file (Edit:  I mean they are Japanese, Chinese or Korean etc)</p>
