> It's not a shame, and your statement is not correct.
It would have been a shame if my info had been valid, but...
>
> CString does *not* provide a const char* operator. All it provides is
> operator LPCTSTR(), which is not useful for the purpose of converting
> between Unicode/non-Unicode strings.
Correct. I did indeed make that mistake /again/, and there is no longer a
(const char *) operator.
>In fact, CString provides *no*
> facility of charatcer conversion.
Sorry, this is incorrect. CString provides constructors that accept both
ANSI and Unicode strings, and likewise operator = also accepts ANSI or
Unicode. So it DOES provide conversions; just not on the way out, which is a
pain if you need to use it for functions that just don't accept Unicode
strings.
>
> As an aside, I don't know why this assumption is so common about CString.
> I've seen people mention this a lot of times, and I don't know what makes
> them believe so.
It's a throwback from 16-bit MFC: since Unicode wasn't prevalent in those
days, the extraction operator (now (LPCTSTR) ) /was/ (const char *). I can't
prove that since I inadvertently lost my copy of MSVC 1.52 and its help
file, but believe me it used to be there.
> I'd rather use #error which enables you to issue a human readable
> error code
> from the compiler which is more helpful than a seemingly unrelated error
> code the compiler finds in the syntax of the 'statement' it tries to
> evaluate as C++ code...
Fair enough, although it was never intended to be anything other than a
quick test {:v)
--
Jason Teagle
[EMAIL PROTECTED]