Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: self contained pointers to structures Message-ID: <1989Nov27.164238.19322@utzoo.uucp> Organization: U of Toronto Zoology References: <10350@attctc.Dallas.TX.US> Date: Mon, 27 Nov 89 16:42:38 GMT In article <10350@attctc.Dallas.TX.US> bobc@attctc.Dallas.TX.US (Bob Calbridge) writes: >struct event { > int timing: > int count; > struct event *next; >}; > >Of course, the compiler complains because the definition of the structure is >incomplete at that point... Defective compiler. A pointer to an incomplete type is perfectly proper, although a variable of the type itself isn't. (Especially not in this case, of course!) Your struct is quite normal and common C practice. -- That's not a joke, that's | Henry Spencer at U of Toronto Zoology NASA. -Nick Szabo | uunet!attcan!utzoo!henry henry@zoo.toronto.edu