Is it very interesting if there is a universal macro for "string", "wstring", which will be substituted depending on the specified project coding, such as TCHAR or do you need to write the macro yourself?
1 answer
Need to write yourself. But it is quite easy to do. There are a couple of options for implementation:
typedef std::basic_string<TCHAR> tstring;#ifdef _UNICODE typedef std::wstring tstring; #else typedef std::string tstring; #endif
- Thanks, I also implemented the second option, but I vote for your first option - code less) - Duracell
|