i am compiling the code in HP itenium server and i am getting an error.

"Filename.cpp", line 129: error #2308: more than one
instance of overloaded function "std::basic_string<_CharT, _Traits,
_Allocator>::assign [with _CharT=char,
_Traits=std::char_traits<char>, _Allocator=std::allocator<char>]"
matches the argument list:
function "std::basic_string<_CharT, _Traits,
_Allocator>::assign(const std::basic_string<_CharT,
_Traits, _Allocator> &) [with _CharT=char,
function "std::basic_string<_CharT, _Traits,
_Allocator>::assign(_Allocator::const_pointer) [with
_CharT=char, _Traits=std::char_traits<char>,
argument types are: (xml::XmlTranscode)
object type is: std::string

And here is the function call for which the error is coming.

DOM_Element pointCodeElement;

Does any one have any idea why this error is. It will be really hepfull if you guys check this out.



Well XmlTranscode(pointCodeElement.getAttribute(TYPE_CODE)) was returning "XMLCh *" and was not able to assign it to string directly. os assigned to a char* and then assigned to string. it worked.

Thanks Naure, for giving attention to it.


This question has already been answered. Start a new discussion instead.