New version of the typical question of how to convert from std::string
to LPCTSTR
.
Reading from different SO posts I learnt that I should do th
Try to look at this page: What-are-TCHAR-WCHAR-LPSTR-LPWSTR-LPCTSTR-etc. If you are using MSVC, than you may have set Unicode for project and LPCSTR
is "translated" to const wchar_t *
, which is not compatible with const char *
By doing this: (LPCTSTR)path.c_str()
you are taking two chars from original string and create from them one unicode wchar_t letter. Thats way you are getting "chinese" characters.