self contained pointers to structures
Henry Spencer
henry at utzoo.uucp
Tue Nov 28 03:42:38 AEST 1989
In article <10350 at attctc.Dallas.TX.US> bobc at 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 at zoo.toronto.edu
More information about the Comp.lang.c
mailing list