MFC实现中文GB2312转为2字节16进制数,该怎么处理

MFC实现中文GB2312转为2字节16进制数
如何实现

------解决方案--------------------
CString Hz="啊";
unsigned char buf[3];
unsigned short *qw;
sprintf(buf,"%s",Hz);
qw=(unsigned short *)buf;
printf("%04x",*qw);//b0a1或a1b0
------解决方案--------------------
探讨

引用:
如何实现
error C2664: 'sprintf' : cannot convert parameter 1 from 'unsigned char [3]' to 'char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-……

------解决方案--------------------
把buf强制转换一下,(char *)buf, 就可以了,sprintf的函数声明看一下就知道了、