我遇到一个问题,这是我的代码,
_bstr_t bstrTrans=L"2";
wsprintf(buf,L"insert into inven(ID) values(%s)",(wchar_t *)bstrTrans)//insert into database
//this can work fine, now we want to let bstrTrans add 1, likes this
int bstrTrans2 = atoi(bstrTrans) + 1;
wsprintf(buf,L"insert into inven(ID) values(%s)",(wchar_t *)bstrTrans2 )
// now ,it cannot work.
所以任何机构都可以帮助我吗?