Re: --(int)d

Discussion in 'C++' started by Peter Nilsson, Dec 14, 2003.

  1. [Cross posted and followups set to comp.lang.c++]

    "yuu" <> wrote in message
    news:...

    [--(int)d where d is an enum type object]

    > Chris Torek <> wrote in message
    > > Modern C++ (which is quite different from the C++ I read about in
    > > the original Stroustrup book) has quite a few different kinds of
    > > casts, with subtly (or even blatantly) different meanings, but in
    > > this particular case, the result of a "C-style cast" is a reference.

    >
    > Are you saying this --(int)d is correct in C++?


    No, he never said that.

    I believe the behaviour is undefined if d's type is not compatible with int,
    but questions on C++ are best answered in C++ groups...

    --
    Peter
    Peter Nilsson, Dec 14, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Schnoffos
    Replies:
    2
    Views:
    1,190
    Martien Verbruggen
    Jun 27, 2003
  2. Hal Styli
    Replies:
    14
    Views:
    1,605
    Old Wolf
    Jan 20, 2004
  3. arun
    Replies:
    8
    Views:
    426
    Dave Thompson
    Jul 31, 2006
  4. aling
    Replies:
    8
    Views:
    927
    Jim Langston
    Oct 20, 2005
  5. Replies:
    9
    Views:
    408
    James Kanze
    Apr 17, 2007
Loading...

Share This Page