Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!psuvax1!rutgers!att!chinet!john From: john@chinet.chi.il.us (John Mundt) Newsgroups: comp.lang.c Subject: Re: self contained pointers to structures Keywords: strange interaction Message-ID: <1989Nov27.210819.9866@chinet.chi.il.us> Date: 27 Nov 89 21:08:19 GMT References: <10350@attctc.Dallas.TX.US> Reply-To: john@chinet.chi.il.us (John Mundt) Distribution: na Organization: Chinet - Chicago Public Access UNIX Lines: 31 In article <10350@attctc.Dallas.TX.US> bobc@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@admctr.chi.il.us *OR* fred@teacha.chi.il.us (312) 998-5007 (Day voice) || -432-8860 (Answer Mach) && -432-5386 Modem