title: C++ "hello world" Boost tee example program
body: <p>The Boost C++ library has <a href="http://www.boost.org/doc/libs/1_39_0/libs/iostreams/doc/functions/tee.html" rel="noreferrer">Function Template tee</a></p>
  
  <blockquote>
    <p>The class templates tee_filter and tee_device provide two ways to split an output sequence
    so that all data is directed simultaneously to two different locations.</p>
  </blockquote>
  
  <p>I am looking for a complete C++ example using Boost tee to output to standard out and to a file like "sample.txt".</p>