I see so many options for C++ string types.
std::string
std::u16string
std::u8string
CString
Platform::String
wchar_t
char
Narrowing this down a bit, my 3 options seem to be:
std::string – standard C++ string
CString – something Microsoft invented
Platform::String – .Net managed string
Platform::string sounds appealing, my program does compile with /clr
CString – might have benefits? I’m not familiar with this one. I’ve seen recomendations to avoid it.
std::string – C++ standard. Are there any memory management issues? Is it just a glorified ASCIIZ null terminatrd C string?
I have an old program using char, compiled with multi-byte character set. I upgrade from vs2012 to vs2013 (c++ library 110 t 120), get a message i need to switch to unicode. Ok what are the pros and cons of each option above?
Tried switching C++ compiler option from MBCS to Unicode, got a lot of errors and warnings.