vendredi 21 septembre 2018

what to use instead of " static const TCHAR* x(_T("hello")) "

Many old C/C++ projects use the ' static TCHAR* ' to define strings, however the ISO C++11 does not allow conversion from string literal to 'TCHAR *' (aka 'wchar_t *'), so I am looking for a safe alternative to writing these static TCHAR* lines

changing them to std::wstring x(L"hello")) poses other issues like already defined in obj, so what to do?

Aucun commentaire:

Enregistrer un commentaire