Visual C++: Migrating traditional C and C++ string code to a Unicode world

前端 未结 6 1882
半阙折子戏
半阙折子戏 2021-02-05 15:37

I see that Visual Studio 2008 and later now start off a new solution with the Character Set set to Unicode. My old C++ code deals with only English ASCII text and is full of:

6条回答
  •  名媛妹妹
    2021-02-05 16:08

    • Around your literal constants with _T(), e.g. _T("Hello world")
    • Replace char with macros CHAR
    • Replace string with wstring

    Then all should work.

提交回复
热议问题