error C2679: binary '=' : no operator defined which takes a right-hand operand o,该怎么解决
error C2679: binary '=' : no operator defined which takes a right-hand operand o
出现这个错误,是缺少什么头文件吗?
我在 win32 控制台程序里 写的:
------解决方案--------------------
不是缺少文件,是不能转换 因为 int,你的控制台程序,int 是4个字节,是不能直接转换的
出现这个错误,是缺少什么头文件吗?
我在 win32 控制台程序里 写的:
int main(int argc, char* argv[])
{
CoInitialize(NULL);
_ConnectionPtr pConn(__uuidof(Connection));
_RecordsetPtr pRst(__uuidof(Recordset));
pConn->ConnectionString = "Provider=microsoft.jet.oledb.4.0;data source=test.mdb";
pConn->Open("","","",adConnectUnspecified);
pRst=pConn->Execute("select Value from PatientSampleResults where CID=1", NULL, adCmdText);
while(!pRst->adoEOF)
{
Result_Value = pRst->GetCollect("Value"); //此处报错 pRst->MoveNext();
}
控制台
win32
数据库
------解决方案--------------------
不是缺少文件,是不能转换 因为 int,你的控制台程序,int 是4个字节,是不能直接转换的