title: C++ operator << (void*)
body: <p>I have the following code</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;sstream&gt;
  
  class oTraceStream : public std::ostringstream
  {
  public :
  
      oTraceStream(const int from, const unsigned int level)
      : m_from(from)
      , m_level(level)
      {
      }
  
      virtual ~oTraceStream(void)
      {
          std::cout &lt;&lt; str();
      }
  
  private :
      // unused for this sample
      int m_from;
      unsigned int m_level;
  };
  
  
  int main(int argc, char* argv[])
  {
      oTraceStream(0,0) &lt;&lt; "1st part " &lt;&lt; " 2nd part" &lt;&lt; std::endl;
      {
          oTraceStream tmp(0,0);
          tmp &lt;&lt; "1st part " &lt;&lt; " 2nd part" &lt;&lt; std::endl;
      }
  
      return 0;
  }
  </code></pre>
  
  <p>With MS Visual 6.0 or old gcc( 2.x), the 2 outputs were the same.</p>
  
  <pre><code>1st part  2nd part
  1st part  2nd part
  </code></pre>
  
  <p>With MS Visual 2008 or recent gcc (4.x) the first string of the first line is displayed as a pointer</p>
  
  <pre><code>0x80493ec 2nd part
  1st part  2nd part
  </code></pre>
  
  <p>Can someone explain me why, whith recent compiler the first line is displayed using ostream::operator&lt;&lt;(const void* p) instead of ostream::operator&lt;&lt;(const char *) ?</p>