What is the simplest way to convert char[] to/from tchar[] in C/C++(ms)?
问题 This seems like a pretty softball question, but I always have a hard time looking up this function because there seem there are so many variations regarding the referencing of char and tchar. 回答1: MultiByteToWideChar but also see "A few of the gotchas of MultiByteToWideChar". 回答2: The simplest way is to use the conversion macros: CW2A CA2W etc... MSDN 回答3: TCHAR is a Microsoft-specific typedef for either char or wchar_t (a wide character). Conversion to char depends on which of these it