self contained pointers to structures
John Mundt
john at chinet.chi.il.us
Tue Nov 28 08:08:19 AEST 1989
In article <10350 at attctc.Dallas.TX.US> bobc at attctc.Dallas.TX.US (Bob Calbridge) writes:
>Here's one that confounded me. I wanted to link a number of records of the
>same type.
>
>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.
A perfectly legal construct. However, notice the colon rather than
the semicolon after the first line
int timing:
I realize that this was typed for mailing and the typo may not exist
in the original, but there may be some other typo that is squirreling
things. Look real carefully.
Some older compilers get sick if the same name is used twice
in two different structures, and that may be causing the problem as
well.
--
---------------------
John Mundt Teachers' Aide, Inc. P.O. Box 1666 Highland Park, IL
john at admctr.chi.il.us *OR* fred at teacha.chi.il.us
(312) 998-5007 (Day voice) || -432-8860 (Answer Mach) && -432-5386 Modem
More information about the Comp.lang.c
mailing list