In article <8D**********************************@microsoft.co m>,
=?Utf-8?B?QXJqdW4=?= <Ar***@discussions.microsoft.comwrote:
>After migrating my application from VC++ 6.0 to VC++ 2005, I receive the
error C2593 'operator +=' is ambiguous.
>Name += pManager->GetAgentName();
where Name is a string and GetAgentName also returns a string.
> The concept of 'string' in C++ is a very vague and overloaded
concept. Do you mean a char*, a std::string, a CString (ATL/MFC), a
tstring? [Or any other number of custom C++ string classes which may
exist in your code.] Or the unicode versions of any/all of those?
> My recommendation: find out what the types *really* are in the
line you posted above. That'll usually help point you in the right
direction, as I bet you'll find that they're different.
>Its a CString.
CString MachineName;
First, don't top-post. English is read left-to-right,
top-to-bottom. Trim off your replies to be just what you're
responding to.
Next, why bring up 'MachineName' when is not found in the code
snippet you gave above -- it's 'Name' and whatever GetAgentName()
returns. Also, note that I said to investigate the type*S* in that
line. Not 'type'. Plural. In your line about 'Name +=
blah->GetAgentName()', you need to look into the type*S* of the left
and right sides of that.
Nathan Mates
--
<*Nathan Mates - personal webpage
http://www.visi.com/~nathan/
# Programmer at Pandemic Studios --
http://www.pandemicstudios.com/
# NOT speaking for Pandemic Studios. "Care not what the neighbors
# think. What are the facts, and to how many decimal places?" -R.A. Heinlein