L prefix for strings in C++

前端 未结 5 1566
遇见更好的自我
遇见更好的自我 2021-01-05 10:45

I have a static library. This library have the following function defined

int WriteData(LPTSTR s)

The sample to call the function is

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-05 11:02

    The L prefix makes the string a wchar_t string. You can use the Windows API function MultiByteToWideChar to convert an ANSI string to a wchar_t string.

提交回复
热议问题