error C2593; Program compiles under VS6 but not under VS10
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3848527/error-c2593-operator-is-ambiguous-compiled-fine-on-vs6-but-i-get-that-erro">error C2593: &#39;operator =&#39; is ambiguous; Compiled fine on VS6, but I get that error on VS10</a>  </p>
</blockquote>



<p>I get the following error:</p>

<pre><code>1&gt;c:\documents and settings\krzys\desktop\desktop icons\ollydbg\plugins\odbgscript\OllyLangCommands.cpp(3602): error C2593: 'operator =' is ambiguous
1&gt;          c:\documents and settings\krzys\desktop\desktop icons\ollydbg\plugins\odbgscript\var.h(45): could be 'var &amp;var::operator =(const long double &amp;)'
1&gt;          c:\documents and settings\krzys\desktop\desktop icons\ollydbg\plugins\odbgscript\var.h(42): or       'var &amp;var::operator =(const int &amp;)'
1&gt;          c:\documents and settings\krzys\desktop\desktop icons\ollydbg\plugins\odbgscript\var.h(41): or       'var &amp;var::operator =(const ulong &amp;)'
1&gt;          while trying to match the argument list '(var, std::streamsize)'
</code></pre>

<p>At this code:</p>

<pre><code>map&lt;string, var&gt; variables;
streamsize sum = 0;

if (sum) {
    variables["$RESULT"] = sum;  // Error 1
    return true;
}
</code></pre>

<p>and</p>

<pre><code>class var
{
public:
 ulong dw;
 string str;
 long double flt;
 vtype vt;
 bool isbuf;
 int size;

 var();
 var(const var&amp; rhs); 
 var(string&amp; rhs); 
 var(ulong rhs); 
 var(int rhs); 
 var(long double rhs); 

 // less than zero this &lt; rhs
 // zero this == rhs 
 // greater than zero this &gt; rhs 
 int compare(const var&amp; rhs) const; 
 int compare(const string&amp; rhs) const; 
 int compare(const ulong&amp; rhs) const; 
 int compare(const int&amp; rhs) const; 
 int compare(const long double&amp; rhs) const; 

 string strclean(void);
 string strbuffhex(void);
 string strbuff(void);

 var&amp; operator=(const var&amp; rhs);
 var&amp; operator=(const string&amp; rhs);
 var&amp; operator=(const ulong&amp; rhs); // Error 4
 var&amp; operator=(const int&amp; rhs); // Error 3
 var&amp; operator=(unsigned short&amp; rhs);
 var&amp; operator=(unsigned char&amp; rhs);
 var&amp; operator=(const long double&amp; rhs); // Error 2

 var&amp; operator+=(const var&amp; rhs);
 var&amp; operator+=(const string&amp; rhs);
 var&amp; operator+=(const ulong&amp; rhs);
 var&amp; operator+=(const int&amp; rhs);
 var&amp; operator+=(const long double&amp; rhs);

 void resize(ulong newsize);

};
</code></pre>

<p>Compiled perfectly with VS6, but now I'm getting this error with VS10.</p>
