title: C++ cout auto separator
body: <p>I am wondering if there is way that <code>std::cout</code> automatically will insert some predefined value between printed sequences.</p>
  
  <p>For example:</p>
  
  <pre><code>std::cout &lt;&lt; 2 &lt;&lt; 3 &lt;&lt; 33 &lt;&lt; 45 &lt;&lt; std::endl;
  </code></pre>
  
  <p>outputs</p>
  
  <pre><code>233345
  </code></pre>
  
  <p>and I would like it to output</p>
  
  <pre><code>2 3 33 45
  </code></pre>
  
  <p>and I know, that it's easy to:</p>
  
  <pre><code>std::cout &lt;&lt; 2 &lt;&lt; " " &lt;&lt; 3 &lt;&lt;  " " &lt;&lt; 33 &lt;&lt;  " " &lt;&lt; 45 &lt;&lt; std::endl;
  </code></pre>
  
  <p>But I'am wondering if there is a way to automate this, such as:</p>
  
  <pre><code>std::cout &lt;&lt; set_some_separator(" ") &lt;&lt; 2 &lt;&lt; 3 &lt;&lt; 33 &lt;&lt; 45 &lt;&lt; std::endl;
  </code></pre>
  
  <p>Anyone aware of something like this being possible?</p>