Re: What kind of error can cause such a problem?

Discussion in 'C++' started by Ron Natalie, Jun 25, 2003.

  1. Ron Natalie

    Ron Natalie Guest

    "Chandra Shekhar Kumar" <> wrote in message news:...
    > cud u plzz give more details...perhaps u r calling sizeof() on some
    > temporary which is nomore alive
    >

    Temporaries don't have any problem with sizeof (and sizeof is a compile
    time issue that has nothing to do with object lifetime).

    Most likely the sizeof is being applied to an incomplete definition.

    class foo;
    sizeof (foo)

    Sizeof is an operator by the way not a function. It's not "called" on anything
    and the parens are not part of the operator.
    Ron Natalie, Jun 25, 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. Nils Petter Vaskinn
    Replies:
    0
    Views:
    770
    Nils Petter Vaskinn
    Jun 25, 2003
  2. Jeremy Chapman
    Replies:
    0
    Views:
    939
    Jeremy Chapman
    Nov 16, 2006
  3. yezi

    How to read such kind of file format ?

    yezi, Oct 27, 2005, in forum: C Programming
    Replies:
    5
    Views:
    410
    Flash Gordon
    Oct 28, 2005
  4. Replies:
    1
    Views:
    243
    Andy Fish
    Mar 31, 2008
  5. pereges
    Replies:
    9
    Views:
    247
    pereges
    Jun 26, 2008
Loading...

Share This Page