CString str; int number=15; //str="15" str.Format(_T("%d"),number); 其中,_T

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/06 16:53:01

CString str; int number=15; //str="15" str.Format(_T("%d"),number); 其中,_T
CString str; int number=15; //str="15" str.Format(_T("%d"),number); 其中,_T

CString str; int number=15; //str="15" str.Format(_T("%d"),number); 其中,_T
在VS中编码默认为多字节.
但是,如何使用unicode呢?
如何在改变编码方式的时候尽量不改动原来的代码呢?
_T()的作用就体现了,你把设置中的编码改成什么,它的结果就是什么.
比如改成unicode,那么_T("hello")等价于L"hello".
改成多字节,那么_T("hello")等价于"hello".