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

根据MSDN:

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

您可以编写TCHAR char或wchar_t取决于编译器MACRO UNICODE

std :: string和std :: wstring是否有类似的符号?

谢谢!

(我的VC ++版本是2013)


你可以自己定义它:

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

我没有找到一个。 我自己在我这样的代码中写了一个 -

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

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

下一篇: How Can Be Used the Command Line of Developer Command Prompt in Vim on Windows?