源代码:
定义
struct_sqlerrp
{
charsqlerrpp[3];// Product
charsqlerrpv[2];// Version
charsqlerrpr[2];// Release
charsqlerrpm[1];// Modification
}sqlerrp;// Diagnostic information调用
memcpy(sqlca.sqlerrp," ",8);错误提示:
error C2664: 'memcpy' : cannot convert parameter 1 from 'struct _SQLCA::_sqlerrp' to 'void *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Error executing cl.exe.
定义
struct_sqlerrp
{
charsqlerrpp[3];// Product
charsqlerrpv[2];// Version
charsqlerrpr[2];// Release
charsqlerrpm[1];// Modification
}sqlerrp;// Diagnostic information调用
memcpy(sqlca.sqlerrp," ",8);错误提示:
error C2664: 'memcpy' : cannot convert parameter 1 from 'struct _SQLCA::_sqlerrp' to 'void *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Error executing cl.exe.
就是要你用地址呀
另外,最好逐个成员赋值,不要一起处理。