Take the tour ×  Is there an string equivalent to LPTSTR? I know
of string and wstring. Is there a tstring?  share|improve this
question add comment  2 Answers  up vote 8 down vote accepted
You could define one:  typedef std::basic_string<TCHAR>
mystring; mystring test = _T("Hello World!"); share|improve this
answer Would you need to make new traits too? –  GManNickG Dec 1
'09 at 6:59 AFAIK TCHAR is either char or wchar_t. The standard
provides a specialization for both types. –  AraK Dec 1 '09 at
7:02 GMan: tstring becomes an alias for either string or wstring
(they are typedefs of basic_string<char> and
basic_string<wchar_t>, respectively). –  Roger Pate Dec 1 '09 at
7:24 Indeed, I was thinking completely wrong for a bit. This
solution seems rather clean, then. (Just rename it tstring and
throw it in a namespace :P) –  GManNickG Dec 1 '09 at 7:26 Hah,
oops, I actually read the answer as 'tstring' instead of
'mystring', since that is the common name. –  Roger Pate Dec 1
'09 at 7:31 show 1 more comment  Anot