On Mon, Jun 18, 2001 at 09:53:59PM +1000, Martin Kalen wrote:
> ----- Original Message -----
> From: "Miroslaw Dobrzanski-Neumann" <[EMAIL PROTECTED]>
> > switch ()
> > expects an integral (bool, enum, int, ...) type not an array.
>
> Correct...
>
> > what about this:
> > if ("John" == value)
>
> I would say "nay" to this considering all the side effects of pointer
> comparison. This is true if (and only if) the address of "value"
> equals the address where the compiler has put the const char* "John".
In the previous mail I have redeclared "value" to
std::string value(....transcode());
if ("John" == value)
is the same as
if (std::string("John") == value)
==> this is comparision of objects and not pointer
--
there are rarely things that are not possible in C++
N. Josuttis
===================================
Miroslaw Dobrzanski-Neumann
MOSAIC SOFTWARE AG
Abteilung Basisentwicklung und Forschung
Tel +49-2225-882-291
Fax +49-2225-882-201
E-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]