title: No match for 'operator<<' in std::cout
body: <p>I am developing gsoap web service where I am retrieving vectors of objects in return of a query. I have two ways to do it: first by simple loop and by iterator. None of them working.</p>
  
  <p>The error is:<br></p>
  
  <blockquote>
    <p>error: no match for <code>'operator&lt;&lt;'</code> in <code>'std::cout
    mPer.MultiplePersons::info.std::vector&lt;_Tp, _Alloc&gt;::at&lt;PersonInfo, std::allocator&lt;PersonInfo&gt; &gt;(((std::vector&lt;PersonInfo&gt;::size_type)i))'</code>
    <br></p>
  </blockquote>
  
  <pre><code>MultiplePersons mPer; // Multiple Person is a class, containing vector&lt;PersonInfo&gt; info
  std::vector&lt;PersonInfo&gt;info; // PersonInfo is class having attributes Name, sex, etc.
  std::vector&lt;PersonInfo&gt;::iterator it;
  
  cout &lt;&lt; "First Name: \t";
  cin &gt;&gt; firstname;
  if (p.idenGetFirstName(firstname, &amp;mPer) == SOAP_OK) {
      // for (int i = 0; i &lt; mPer.info.size(); i++) {
      //    cout &lt;&lt; mPer.info.at(i); //Error
      //}
      for (it = info.begin(); it != info.end(); ++it) {
          cout &lt;&lt; *it; // Error
      }
  
  } else p.soap_stream_fault(std::cerr);
  
  }
  </code></pre>
  
  <p>It's obvious that operator overloading <code>operator&lt;&lt;</code> in <code>cout</code> is the problem. I have looked at several problems related to this, but no one helped me out. If someone can provide a concrete example on how to solve it, it would be very appreciated. <em>(Please do not talk in general about it, I am new to C++ and I have spent three days on it searching for solution.)</em></p>