将 lptstr 转换为 char*

2022-01-12 00:00:00 char c++ lptstr

有人知道如何在 C++ 中将类型 LPTSTR 转换为 char * 吗?

Would anyone happen to know how to convert type LPTSTR to char * in C++?

推荐答案

取决于它是否显示为 Unicode.如果不是 Unicode,LPTSTR 是 char*,如果是,则为 w_char*.

Depends if it is Unicode or not it appears. LPTSTR is char* if not Unicode, or w_char* if so.

在这里讨论得更好(已接受的答案值得一读)

Discussed better here (accepted answer worth reading)

相关文章