c How to convert a TCHAR array to std string Stack Overflow
All you need to do is to typedef String as either std string or std wstring depending on your compilation configuration To maintain flexibility you can use the following code #ifndef UNICODE typedef std string String #else typedef std wstring String #endif Now you may use String in your code and let the compiler handle the nasty parts