Re: passing a string to a dll
Dave,
I've been using CString for over 10 years and I still discover new stuff to
do with it. I think it is one of the handiest parts of MFC (considering it
is such a small item). It was also a huge leap, for me, to go from C where
there were essentially no "strings" and immediately into MFC with CString.
It was like getting a new toy for Christmas. We may as well love the little
things.
That said, all the == and != operators are doing are comparing the two
strings. I also find += to be useful even though -= wouldn't be.
Tom
"David Webber" <dave@musical-dot-demon-dot-co.uk> wrote in message
news:%23RnEjtp%23HHA.4712@TK2MSFTNGP04.phx.gbl...
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:85f0f3tmoe183i0qb7q79p93a8jolpv403@4ax.com...
However, if you don't trust CString::operator != to work, there's very
little else about
C++ that can be trusted.
Yeah - I know. But the point remains that the quesion was posted. :-)
I suspect (this is confession time - I'm not necessarily advocating this
as a good idea!) it is because I think of a CString as "a nul-terminated
string of TCHARs with methods". It's a model which works for most
purposes, but the == and != operators are an example of where the model
falls down as they compare the content rather than the address.
Dave
--
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mzusers/mailinglist.htm