Saturday, September 19, 2020

Error C2440 'initializing': cannot convert from 'const char [1]' to 'LPTSTR'

static LPTSTR pstrExtensionList[] = { _T(""), _T(".com"), _T(".exe"), _T(".bat"), _T(".cmd"), NULL, };

When I compiled this piece of code, I got this error:

Error C2440 'initializing': cannot convert from 'const char [1]' to 'LPTSTR'

  1. error C2440: '=': cannot convert from 'const char *' to 'LPCWSTR' [duplicate]
  2. it has three links, they are good to review..

  3. how to convert char array to wchar_t array?
  4. FAQ: Cannot convert from 'const char [..]' to 'LPCTSTR'
  5. cannot convert parameter 1 from 'const char *' to 'LPCWSTR'

No comments:

Post a Comment