error C2664????
-
Hi All, I am getting the follwing error when I try to compilethe code...Please help error C2664: '__thiscall CUSBMgr::CUSBMgr(const class CUSBMgr&)' : cannot convert parameter 1 from 'class CString' to 'const class CUSBMgr&' Reason: cannot convert from 'class CString' to 'const class CUSBMgr' No constructor could take the source type, or constructor overload resolution was ambiguous:confused: Thanks in Advance Ashok
-
Hi All, I am getting the follwing error when I try to compilethe code...Please help error C2664: '__thiscall CUSBMgr::CUSBMgr(const class CUSBMgr&)' : cannot convert parameter 1 from 'class CString' to 'const class CUSBMgr&' Reason: cannot convert from 'class CString' to 'const class CUSBMgr' No constructor could take the source type, or constructor overload resolution was ambiguous:confused: Thanks in Advance Ashok
Looks like the class
CUSBMgr
has no constructor that accepts aCString
. Can you show the code in question?Steve
-
Hi All, I am getting the follwing error when I try to compilethe code...Please help error C2664: '__thiscall CUSBMgr::CUSBMgr(const class CUSBMgr&)' : cannot convert parameter 1 from 'class CString' to 'const class CUSBMgr&' Reason: cannot convert from 'class CString' to 'const class CUSBMgr' No constructor could take the source type, or constructor overload resolution was ambiguous:confused: Thanks in Advance Ashok
Modify the constructor which takes CString as an argument. I guess you are trying to provide the copy constructor for your class. Could you please share the code which gives this error ? Regards, Paresh.
-
Modify the constructor which takes CString as an argument. I guess you are trying to provide the copy constructor for your class. Could you please share the code which gives this error ? Regards, Paresh.
I wrote the code like this CUSBMgr *ptrUSBManger= NULL; CString strControlPortName = _T(""); ptrUSBManger = new CUSBMgr(strControlPortName);///error 2664???? this is the constructor CUSBMgr::CUSBMgr(const CString& strControlPortName) { } Thanks In Advance Ashok
-
I wrote the code like this CUSBMgr *ptrUSBManger= NULL; CString strControlPortName = _T(""); ptrUSBManger = new CUSBMgr(strControlPortName);///error 2664???? this is the constructor CUSBMgr::CUSBMgr(const CString& strControlPortName) { } Thanks In Advance Ashok
can you show the code which is constructing your object, because the compiler talks about
CUSBMgr::CUSBMgr(const class CUSBMgr&)
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
can you show the code which is constructing your object, because the compiler talks about
CUSBMgr::CUSBMgr(const class CUSBMgr&)
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
Which compiler are you using ? Regards, Paresh.
-
Which compiler are you using ? Regards, Paresh.
-
OP means ? is it Original Poster ? Regards, Paresh.
-
OP means ? is it Original Poster ? Regards, Paresh.