What is the macro for std::string/std::wstring in vc++?

According to MSDN:

https://msdn.microsoft.com/en-us/library/windows/desktop/ff381407%28v=vs.85%29.aspx

You can write TCHAR for char or wchar_t depend on compiler MACRO UNICODE

Is there a similar symbol for std::string and std::wstring?

Thanks!

(My VC++ version is 2013)


你可以自己定义它:

typedef basic_string<TCHAR, char_traits<TCHAR>, allocator<TCHAR> >  tstring;

I did not find one. I wrote one myself in my code like this -

#ifdef UNICODE
  #define tstring std::wstring
#else
  #define tstring std::string
#endif
链接地址: http://www.djcxy.com/p/85044.html

上一篇: 由Just In Time中的错误导致的ClassCastException?

下一篇: vc ++中std :: string / std :: wstring的宏是什么?