代码之家  ›  专栏  ›  技术社区  ›  Adrian Fâciu

C++级联

c++
  •  1
  • Adrian Fâciu  · 技术社区  · 16 年前

    在不需要转换为其他内容的情况下,将一个lpwstr/lptstr附加到另一个lpwstr的最佳方法(最佳实践)是什么?

    2 回复  |  直到 16 年前
        1
  •  5
  •   James McNellis    16 年前

    你可能会想用 strcat_s and friends ,这是长度检查版本 strcat and friends .

        2
  •  1
  •   matekm    16 年前

    lpstr==char*所以您可以使用strncat

    使用lpwstr而不是strncat只使用wcsncat

    http://msdn.microsoft.com/en-us/library/tbyd7s1y.aspx