CString name=L"12345";
char query[225];
方法一:
CString是unicode编码
使用%S
sprintf(query, "select * from tb_user where account=\'%S\'", name);
方法二:
使用CStringA(name)转化成string
sprintf(query, "select * from tb_user where account=\'%S\'", CStringA(name));
CString name=L"12345";
char query[225];
方法一:
CString是unicode编码
使用%S
sprintf(query, "select * from tb_user where account=\'%S\'", name);
方法二:
使用CStringA(name)转化成string
sprintf(query, "select * from tb_user where account=\'%S\'", CStringA(name));