This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with class operators.
- From: "Kristian Kratzenstein" <kristian dot kratzenstein at kielnet dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 25 Jul 2005 14:05:58 +0200
- Subject: Re: Problem with class operators.
- References: <BF0A3AC0.2E9%eljay@adobe.com>
Hi Eljay,
thanks, I thought so. I saw in MFC, that this stuff works for the CString
class (with LPSTR, what comes to char* after several "show define"). I
think great, if you like to use the object directly in functions, which
want an char*. But seem to be VS special stuff (CW couldn't handle this
too).
kind regards,
Kristian
Eljay Love-Jensen <eljay@adobe.com> on Montag, 25. Juli 2005 at 13:44
+0100 wrote:
>Hi Kristian,
>
>When you have an ambiguous situation like that, you could try this:
>
>b = (ckstring.operator == (pchar));
>
>Or you could remove the implicit convenience cast (operator char*), to
>something like this, like was done with std::string for the same reason:
>
>char* CkString::c_str();
>
>HTH,
>--Eljay
>
>
>
--------------------------------------------
Kristian Kratzenstein
Gettorf
Kristian.Kratzenstein@KielNET.net
--------------------------------------------