asked on
But compiler said: Fehler: C2664: 'QString::fromUtf16' : cannot convert parameter 1 from 'TCHAR [2048]' to 'const ushort *'
QString strError = chError;
QString strError = (const ushort*)chError;
QString strError = reinterpret_cast<const ushort*>chError;
QString qs = "somewhat";
...
std::wstring ws = (const wchar_t*)qs.utf16();
unsigned short * W2US(wchar_t* ws) { return (unsigned short*)ws); }
const unsigned short * CW2CUS(const wchar_t* ws) { return (const unsigned short*)ws); }
wchar_t * US2W(unsigned short* us) { return (wchar_t*)us); }
const wchar_t CW2CUS(const unsigned short* us) { return (const wchar_t*)us); }
ASKER
C++ is an intermediate-level general-purpose programming language, not to be confused with C or C#. It was developed as a set of extensions to the C programming language to improve type-safety and add support for automatic resource management, object-orientation, generic programming, and exception handling, among other features.
TRUSTED BY
Open in new window