title: ostream iterator usage in c++
body: <p>here is code</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;algorithm&gt;
  #include &lt;vector&gt;
  #include &lt;fstream&gt;
  #include &lt;iterator&gt;
  using std::vector;
  using std::string;
  using std::cout;
  using std::cin;
  using std::ostream_iterator;
  using std::cout;
  
  int main(){
       vector &lt;string&gt; me;
       string s;
       while ((cin&gt;&gt;s) &amp;&amp; s!="end")
           me.push_back(s);
  
       std::copy(me.begin(),me.end(),
           std::ostream_iterator(cout,"\n"));
  
  
  
       return 0;
  }
  </code></pre>
  
  <p>but here is mistakes</p>
  
  <pre><code>1&gt;------ Build started: Project: stl_implementation, Configuration: Debug Win32 ------
  1&gt;  implementation.cpp
  1&gt;c:\users\david\documents\visual studio 2010\projects\stl_implementation\implementation.cpp(21): error C2955: 'std::ostream_iterator' : use of class template requires template argument list
  1&gt;          c:\program files\microsoft visual studio 10.0\vc\include\iterator(516) : see declaration of 'std::ostream_iterator'
  1&gt;c:\users\david\documents\visual studio 2010\projects\stl_implementation\implementation.cpp(21): error C2955: 'std::ostream_iterator' : use of class template requires template argument list
  1&gt;          c:\program files\microsoft visual studio 10.0\vc\include\iterator(516) : see declaration of 'std::ostream_iterator'
  1&gt;c:\users\david\documents\visual studio 2010\projects\stl_implementation\implementation.cpp(21): fatal error C1903: unable to recover from previous error(s); stopping compilation
  ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>