注册 登录
编程论坛 SQL Server论坛

求助,strcpy_s( )有点不明白

hllxd 发布于 2010-05-26 15:47, 796 次点击
在vc2005有  #define deptNo_LEN     2 + 1;
            SQLCHAR     deptNo[deptNo_LEN ];
            strcpy_s(deptNo,deptNo_LEN, "D5");
 结果报错,错误信息是 error C2664: 'errno_t strcpy_s(char *,rsize_t,const char *)' : cannot convert parameter 1 from 'SQLCHAR [3]' to 'char *'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

是怎么回事呢,好像是跟vc2005默认unicode编码有关吧??
1 回复
#2
hllxd2010-05-26 16:17
麻烦给讲一下吧
谢谢。。
1