使用自定义的tstring.h

UNICODE   控制函数是否用宽字符版本
_UNICODE 控制字符串是否用宽字符集

_T("") 根据上述定义来解释字符集 // 在tchar.h中 

// tstring.h

#ifndef TSTRING_H_INCLUDED

#define TSTRING_H_INCLUDED

#include <tchar.h>

#include <string>

#ifdef _UNICODE    

     #define tstring std::wstring

#else  

   #define tstring std::string

#endif

#endif // TSTRING_H_INCLUDED

原文地址:https://www.cnblogs.com/zxpo/p/3585021.html