Incomplete type

Discussion in 'C Programming' started by prashna, Jun 27, 2003.

  1. prashna

    prashna Guest

    Hi friends,
    What is an incomplete type in C?
    prashna, Jun 27, 2003
    #1
    1. Advertising

  2. "prashna" <> wrote in message
    news:...
    > What is an incomplete type in C?


    To paraphrase the C standard, an incomplete type is a type that describes an
    object but lacks information needed to determine its size. Examples include

    /* forward-declared struct */
    struct foo;

    /* my_array is an array of ints, but we don't know how big */
    extern int my_array[];

    void is another incomplete type. Unlike other incomplete types, void cannot
    be completed.

    Regards,

    Russell Hanneken
    Russell Hanneken, Jun 27, 2003
    #2
    1. Advertising

  3. On 27 Jun 2003 03:14:05 -0700, in comp.lang.c ,
    (prashna) wrote:

    >Hi friends,
    >What is an incomplete type in C?


    its a type which is, er, incomplete. Such as
    struct foobar;
    foobar is incomplete because you've not defined its members.



    --
    Mark McIntyre
    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
    CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>


    ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
    Mark McIntyre, Jun 27, 2003
    #3
  4. Mark McIntyre wrote:
    > On 27 Jun 2003 03:14:05 -0700, in comp.lang.c ,
    > (prashna) wrote:
    >
    >
    >>Hi friends,
    >>What is an incomplete type in C?

    >
    >
    > its a type which is, er, incomplete. Such as
    > struct foobar;
    > foobar is incomplete because you've not defined its members.
    >


    Well, hmm, I think it is more correct to say that it is
    incomplete because you cannot determine the size of an object
    of type struct foobar. (which is of course a side effect of
    the compiler not knowing the members of the struct, but this
    view is to simplistic I think).

    --
    Thomas.
    Thomas Stegen, Jun 28, 2003
    #4
    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. Andrew Ward
    Replies:
    7
    Views:
    496
    tom_usenet
    Feb 25, 2004
  2. Mikhail N. Kupchik
    Replies:
    4
    Views:
    3,154
    Jonathan Turkanis
    Sep 15, 2004
  3. Lou Pecora
    Replies:
    6
    Views:
    67,691
    santoshreddy3
    Jul 7, 2011
  4. gk245
    Replies:
    2
    Views:
    1,196
    Christopher Benson-Manica
    May 6, 2006
  5. Replies:
    1
    Views:
    955
    Richard Bos
    Jan 17, 2008
Loading...

Share This Page