C++ – 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.

Best Answer

The simplest way is to use the conversion macros:

  • CW2A
  • CA2W
  • etc...