使用自定义的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

posted @ 2014-03-06 17:58  zxpo  阅读(280)  评论(0编辑  收藏  举报