title: Error : error C2663: 'std::_Tree<_Traits>::insert' : 2 overloads have no legal conversion for 'this' pointer
body: <p>I am getting above error , if anybody have any idea please help me.</p>
  
  <p>I am getting this error in <code>void traverse</code> function where i have used <code>insert</code> function for inserting into map.</p>
  
  <pre><code>struct node {
      int weight;
      unsigned char value;
      const node *child0;
      const node *child1;
      map&lt;unsigned char, string&gt; huffmanTable;
  
      node( unsigned char c = 0, int i = -1 ) {
          value = c;
          weight = i;
          child0 = 0;
          child1 = 0;
      }
  
      node( const node* c0, const node *c1 ) {
          value = 0;
          weight = c0-&gt;weight + c1-&gt;weight;
          child0 = c0;
          child1 = c1;
      }
  
      bool operator&lt;( const node &amp;a ) const {
          return weight &gt;a.weight;
      }
  
      void traverse(ostream&amp; o,string code="") const {
  
      if ( child0 ) {
          child0-&gt;traverse(o, code + '0' );
          child1-&gt;traverse(o, code + '1' );
      } else {
          o&lt;&lt;value&lt;&lt;"\t";
          cout &lt;&lt;" " &lt;&lt;value &lt;&lt;"    ";
  
          o&lt;&lt;weight&lt;&lt;"\t";
          cout &lt;&lt;weight;
          o&lt;&lt;code&lt;&lt;endl;
  
          cout &lt;&lt;"     " &lt;&lt;code &lt;&lt;endl;
          huffmanTable.insert(pair&lt;unsigned char, std::string&gt;(value,code));
  
      }
  }
  
  };
  </code></pre>