C2664 error
-
I am building legacy application in VS2008 solution. I have the followng lines in my code
template <class MapType, class DestinationType = MapType::referent_type>
class MapCopy
{
public :
typedef DestinationType destination_type;
typedef typename MapType::value_type source_type;
static HRESULT copy(destination_type* pTo ,source_type *pFrom) //here i am getting C2664
{
}on building this project i am getting the following error error C2664: copy' : cannot convert parameter 2 from 'const std::pair<_Ty1,_Ty2> *' to 'std::pair<_Ty1,_Ty2> *' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlcom.h How to getrid of this error? Regards
-
I am building legacy application in VS2008 solution. I have the followng lines in my code
template <class MapType, class DestinationType = MapType::referent_type>
class MapCopy
{
public :
typedef DestinationType destination_type;
typedef typename MapType::value_type source_type;
static HRESULT copy(destination_type* pTo ,source_type *pFrom) //here i am getting C2664
{
}on building this project i am getting the following error error C2664: copy' : cannot convert parameter 2 from 'const std::pair<_Ty1,_Ty2> *' to 'std::pair<_Ty1,_Ty2> *' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlcom.h How to getrid of this error? Regards
subramanyeswari wrote:
How to getrid of this error?
Check this page for details on Compiler Error C2664[^] Possible solutions specified in MSDN 1. Recheck the prototype for the given function and correct the argument noted in the error message. 2. Supply an explicit conversion if necessary.
-
I am building legacy application in VS2008 solution. I have the followng lines in my code
template <class MapType, class DestinationType = MapType::referent_type>
class MapCopy
{
public :
typedef DestinationType destination_type;
typedef typename MapType::value_type source_type;
static HRESULT copy(destination_type* pTo ,source_type *pFrom) //here i am getting C2664
{
}on building this project i am getting the following error error C2664: copy' : cannot convert parameter 2 from 'const std::pair<_Ty1,_Ty2> *' to 'std::pair<_Ty1,_Ty2> *' C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\atlmfc\include\atlcom.h How to getrid of this error? Regards