title: Print a vector using iterator c++
body: <p>I want to print a vector using an iterator:</p>
  
  <pre><code>#include &lt;vector&gt;
  #include &lt;istream&gt;
  #include &lt;iostream&gt;
  #include &lt;sstream&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;math.h&gt;
  using namespace std;
  
  typedef vector&lt;int&gt; board;
  typedef vector&lt;int&gt; moves;
  
  
  int sizeb;
  board start;
  moves nmoves;
  istringstream stin;
  
  
  board readIn(std :: istream&amp; in ) {
      int val;
      while (in &gt;&gt; val)
      start.push_back(val);
  
      sizeb = start[0];
      return start;
  }
  
  
  void printboard(board n) {
      int sizem = sizeb*sizeb;
      int i = 1;
  
      for (vector&lt;int&gt;::iterator it = start.begin() ; it != start.end(); ++it) {
          for (int j = 0; j &lt; sizeb; ++j)
              cout &lt;&lt;  "\t" &lt;&lt; it;
          cout &lt;&lt; endl;
      }
  }
  </code></pre>
  
  <p>And I receive this error:</p>
  
  <pre><code>error: invalid operands to binary expression
    ('basic_ostream&lt;char, std::__1::char_traits&lt;char&gt; &gt;' and
    'vector&lt;int&gt;::iterator' (aka '__wrap_iter&lt;pointer&gt;'))
                      cout &lt;&lt;  "\t" &lt;&lt; it;
  </code></pre>
  
  <p>Could you help me?</p>
  
  <p>I think I'm converting a string that I receive in a int type. Maybe I'm not using on the right way the iterator (I think that's the problem, but I don't really know)</p>
  
  <p>Thanks in advance.</p>