title: how can I convert istream * to string or just print it?
body: <p>The below function part of connector/C++, it returns a istream*. if i just try and print it, it shows hex or a memory location because its a * type.</p>
  
  <pre><code>istream *stream = res-&gt;getBlob(1);
  </code></pre>
  
  <p>I tried to read &amp; print it with this:</p>
  
  <pre><code>    string s; 
      while (getline(*stream, s))
      cout &lt;&lt; s &lt;&lt; endl; 
  </code></pre>
  
  <p>But this crashes with access violation though. any other way i can print it or convert to string?</p>
  
  <p>the value of stream before the getline:</p>
  
  <ul>
  <li>stream  0x005f3e88 {_Chcount=26806164129143632 }    std::basic_istream > *</li>
  </ul>
  
  <p>so it seems that its valid to me. I think it would be null or 0 if it failed</p>