看一些程序使用字符串时经常使用_T()之类的东西,不知道有何作用?

解决方案 »

  1.   

    TCHAR
    The TCHAR data type is a Win32 character string that can be used to describe ANSI, DBCS, or Unicode strings. For ANSI and DBCS platforms, TCHAR is defined as follows:typedef char          TCHAR;  
      
    For Unicode platforms, TCHAR is defined as synonymous with the WCHAR type. 
      

  2.   

    对,就是你的程序里面在 ANSI 和 UNICODE 系统中自动识别了!在ANSI 
    #define _T __T
    #define __T(x) x
    _T()不做任何变化,在UNICODE里面就转成UNICODE!
      

  3.   

    这个问题就给了 100 分受不了,我给别人写一个串口通信程序才拿到 20 分
                   写一个 MODEM 传送数据才 400 分还被扣了300分
    为什么不用自己 MSDN ???现在的过程MSDN  别人 ---  interner  ---  你
    亏不亏?
    再有什么,先从 MSDN 查一把如果你分多给我点吧 :)
      

  4.   

    _T("sss");
    就是把字符串sss转换成Unicode 格式