Please could someone explain why this does not work?
char *test = "test";
_TCHAR *szTest = CA2W(test);
And please tell me what I should be doing instead.
Instead of giving me equal text, it's giving me:
Please could someone explain why this does not work?
char *test = "test";
_TCHAR *szTest = CA2W(test);
And please tell me what I should be doing instead.
Instead of giving me equal text, it's giving me:
According to MSDN, that is bad. So I have used this instead:
char *test = "test";
CA2W szTest(test);
From here, we can get an LPWSTR type if we really want:
LPWSTR test = szTest.m_psz;
It also seems better to use LPWSTR instead of _TCHAR * - but I'm not sure (I think they're essentially the same thing, but could be wrong).