Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试像这样在这里创建一个 tchar 数组: TCHAR c_wText[100] = _T("string here");
但是在编译时我收到一条错误消息:int-array initialized from non-wide string
我错过了什么?
我正在总结@WhozCraig 所说的话:
对于 unicode 构建,您需要同时定义 UNICODE 和 _UNICODE
然后使用 TCHAR 和 _T("your string")