Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ambiguity between TVariantTs

Status
Not open for further replies.

wwilborn

Programmer
Jun 25, 2009
2
US
I have minimal experience with C++, and I am converting a C++ Builder 5 program to C++ Builder 2009. I am getting the error E2015 Ambiguity between 'TVariantT<tagVARIANT, 1>::TVariantT(const TVariantT,1>TVariantT<tagVARIANT, 1::TVariantT(const tagVARIANT &, bool)

Code:
  BSTR __fastcall formatDate(Variant varDate/*[in]*/, BSTR bstrFormat/*[in]*/, TVariant varDestLocale/*[in,opt]*/= TNoParam())
{
BSTR pbstrFormattedString = 0;
OLECHECK(this->formatDate(varDate, bstrFormat, varDestLocale, (BSTR*)&pbstrFormattedString));
return pbstrFormattedString;
}
 
I think I got it sorted out. Evidently there is a difference in how the NoParam function is handled.

William Wilborn
Senior Software Engineer
Alion Science and Technology
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top