<p>So you want to copy a file quickly and easily, and most important,
      completely portably.  And since this is C++, you have an open
      ifstream (call it IN) and an open ofstream (call it OUT):
   </p><pre class="programlisting">
   #include &lt;fstream&gt;

   std::ifstream  IN ("input_file");
   std::ofstream  OUT ("output_file"); </pre><p>Here's the easiest way to get it completely wrong:
   </p><pre class="programlisting">
   OUT &lt;&lt; IN;</pre><p>For those of you who don't already know why t