string 和 wstring

区别:

  char*      wchar_t

  一个字节     两个字节

  ACSII编码    unicode编码

 

 

转换:

  1、Windows API

    WideCharToMultiByte()

    MultiByteToWideChar()

  2、ATL (还是依赖于Windows平台...)

    (1)、CA2W 类、CW2A类

    (2)、A2W宏、W2A宏

    (3)、T2W、W2T

  3、跨平台  (CRT库)

    mbstowcs()

    wcstomns()

 

编程统一化,编写单一源代码

 

posted @ 2016-04-20 14:18  CppSkill  阅读(427)  评论(0编辑  收藏  举报