描述:
除了wsprintf()之外还有没有其他将char[]转换到WCHAR[]的方法?
因为我在编译单独的源文档的时候由于使用了project setting中的preprocessor definitions:_UNICODE,UNICODE wsprintf编译成功,但是在对整个工程进行rebuild时,在其他文档中发生了对UNICODE不兼容的问题,例如strlen()的调用问题: error C2664: 'strlen' : cannot convert parameter 1 from 'const unsigned short *' to 'const ch。
为了解决这个问题,在project setting中的preprocessor definitions:中取消了_UNICODE,UNICODE ,并单独在要使用wsprintf()的文档中定义了UNICODE和_UNICODE,但 error C2664: 'wsprintfA' : cannot convert parameter 1 from 'unsigned short [81]' to 'char *'
请各位高手指教。或者有没有其他的转换方法。在线等!
解决方案1:
strlen
=>
_tcslen
http://community.csdn.net/Expert/topic/3320/3320756.xml?temp=.3085291