title: Error C2593: 'operator =' is ambiguous For string template
body: <p>I keep getting this error for  part of my template, for  this is working fine. I would love to handle this error myself but I don't even know what this means. Maybe my operator overload syntax is incorrect? But even without my operator loading method I still get the same error</p>
  
  <pre><code>node.h(12): error C2593: 'operator =' is ambiguous
    c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring(992): could be 'std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;std::basic_string&lt;_Elem,_Traits,_Alloc&gt;::operator =(_Elem)'
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;,
  1&gt;              _Alloc=std::allocator&lt;char&gt;
  1&gt;          ]
  1&gt;          c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring(987): or       'std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;std::basic_string&lt;_Elem,_Traits,_Alloc&gt;::operator =(const _Elem *)'
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;,
  1&gt;              _Alloc=std::allocator&lt;char&gt;
  1&gt;          ]
  
  c:\program files (x86)\microsoft visual studio 11.0\vc\include\xstring(987): or       'std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;std::basic_string&lt;_Elem,_Traits,_Alloc&gt;::operator =(const _Elem *)'
  1&gt;          with
  1&gt;          [
  1&gt;              _Elem=char,
  1&gt;              _Traits=std::char_traits&lt;char&gt;,
  1&gt;              _Alloc=std::allocator&lt;char&gt;
  1&gt;          ]
  1&gt;          while trying to match the argument list '(std::string, int)'
  1&gt;          c:\users\aaron\documents\visual studio 2012\projects\redblacktreefinal\redblacktreefinal\node.h(10) : while compiling class template member function 'Node&lt;T&gt;::Node(void)'
  1&gt;          with
  1&gt;          [
  1&gt;              T=std::string
  1&gt;          ]
  1&gt;          c:\users\aaron\documents\visual studio 2012\projects\redblacktreefinal\redblacktreefinal\redblacktree.cpp(145) : see reference to function template instantiation 'Node&lt;T&gt;::Node(void)' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              T=std::string
  1&gt;          ]
  1&gt;          c:\users\aaron\documents\visual studio 2012\projects\redblacktreefinal\redblacktreefinal\redblacktree.cpp(203) : see reference to class template instantiation 'Node&lt;T&gt;' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              T=std::string
  1&gt;          ]
  1&gt;          c:\users\aaron\documents\visual studio 2012\projects\redblacktreefinal\redblacktreefinal\redblacktree.cpp(197) : while compiling class template member function 'bool RedBlackTree&lt;T&gt;::remove(T)'
  1&gt;          with
  1&gt;          [
  1&gt;              T=std::string
  1&gt;          ]
  1&gt;          c:\users\aaron\documents\visual studio 2012\projects\redblacktreefinal\redblacktreefinal\redblacktreefinal.cpp(240) : see reference to function template instantiation 'bool RedBlackTree&lt;T&gt;::remove(T)' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              T=std::string
  1&gt;          ]
  1&gt;          c:\users\aaron\documents\visual studio 2012\projects\redblacktreefinal\redblacktreefinal\redblacktreefinal.cpp(213) : see reference to class template instantiation 'RedBlackTree&lt;T&gt;' being compiled
  1&gt;          with
  1&gt;          [
  1&gt;              T=std::string
  1&gt;          ]
  </code></pre>
  
  <p>My node.h file</p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;cstring&gt;
  
  template &lt;class T&gt;
  class Node {
  
      public :
  
          Node&lt;T&gt;(void) {
              parent  = NULL;
              left    = NULL;
              right   = NULL;
              data    = NULL;
              isBlack = false;
          }
          Node&lt;T&gt;(T x){
              parent  = NULL;
              left    = NULL;
              right   = NULL;
              data    = x;
              isBlack = false; 
          }
          Node&lt;T&gt;(const Node&lt;T&gt;* &amp; nd){
              parent  = nd-&gt;parent;
              left    = nd-&gt;left;
              right   = nd-&gt;right;
              data    = nd-&gt;data;
              isBlack = nd-&gt;isBlack;
          }
  
          Node&lt;T&gt; &amp; Node&lt;T&gt;::operator = (const Node&lt;T&gt;* &amp; nd){
              parent  = nd-&gt;parent;
              left    = nd-&gt;left;
              right   = nd-&gt;right;
              data    = nd-&gt;data;
              isBlack = nd-&gt;isBlack;
              return* this;
          }
  
          Node&lt;T&gt;* parent;
          Node&lt;T&gt;* left;
          Node&lt;T&gt;* right;
  
          T   data;
          bool  isBlack;
  
      private :
  
  };
  </code></pre>
  
  <p>How it's being used</p>
  
  <pre><code>void part2()
  {
    cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; "REDBLACKTREE&lt;STRING&gt;";
    cout &lt;&lt; endl &lt;&lt; "insert file and print contents (load, dump)" &lt;&lt; endl;
    RedBlackTree&lt;string&gt; rb;
    string fname = "part2.txt"; //should contain strings
    int n = 0;
  
    // read file and load contents into tree
    string* arr = readFile&lt;string&gt;(fname, n);
    rb.load(arr, n);
  
    // read contents from tree into array
    int out_n = 0;
    string* out = rb.dump(out_n);
  
    // print dumped contents
    int count = 0;
    for(int i=0; i &lt; out_n; i++){
           if(count % 5 == 0){
                   cout &lt;&lt; endl;
           }
           cout &lt;&lt; left &lt;&lt; setw(13) &lt;&lt; out[i];
           count ++;
    }
    cout &lt;&lt; endl;
    statsPrint(rb, 174, 5, 9, true);
  
    // remove all items from tree
    cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; "empty tree one item at a time";
    for(int i=0; i &lt; n; i++){
           rb.remove(arr[i]);
    }
    statsPrint(rb, 0, 0, 0, true);
  
    delete[] arr;
    delete[] out;
  }
  </code></pre>