c++ - Making TCHAR* compatible with char* -
so quick question how make tchar* (or wchar_t macro) work char*?
i using unicode character set.
the code problem is:
tchar* d3ddevtypetostring(d3ddevtype devtype) { switch (devtype) { case d3ddevtype_hal: return text("d3ddevtype_hal"); case d3ddevtype_sw: return text("d3ddevtype_sw"); case d3ddevtype_ref: return text("d3ddevtype_ref"); default: return text("unknown devtype"); } }
the obvious solution change tchar* char* keep tchar* if possible.
thanks.
and yes using unicode character set.
then cannot make tchar compatible char. because if you're using ucs, tchar wchar_t. type char
not related in way wchar_t
. work convert string (using e.g. widechartomultibyte
), you'd lose unicode support.
Comments
Post a Comment