Re: string class and UNICODE?
"lost_in_space" <a@b.com> ha scritto nel messaggio
news:uJPAI1MuIHA.4848@TK2MSFTNGP05.phx.gbl...
Thanks for the reponse. In fact I'm trying to get away from using
CString - the library I'm working on had previously used just this
solution. I'm trying to remove any dependency on either ATL or MFC and
implement it with STL/std::string. This was partly an educational
exercise, otherwise I'd happily use CString.
Hi,
if you don't want any dependency on either ATL or MFC, choosing
std::string/wstring is fine, of course.
Moreover, some quality programmers prefer STL strings because these
programmers don't like some implicit conversions that happen with ATL/MFC
CString (we recently had a thread in the MFC newsgroup, when there was a
subtle bug caused by implict call to CString::operator LPCTSTR - that bug
does not happen with STL strings, because to get e.g. a 'const char*' with
an std::string instance, the .c_str() method must be *explicitly* called).
What I like about C++ is that there are lots of tools available: we are free
to choose the best tools for the particular problem to solve.
Giovanni