Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!quiche!storm From: storm@cs.mcgill.ca (Marc WANDSCHNEIDER) Newsgroups: comp.lang.c Subject: What is wrong with Struct? Message-ID: <1991May11.053827.18109@cs.mcgill.ca> Date: 11 May 91 05:38:27 GMT Sender: news@cs.mcgill.ca (Netnews Administrator) Organization: SOCS, McGill University, Montreal, Canada Lines: 37 What is wrong with the following delcaration in my file sim.h: typedef struct HP { int last; Eventtype items[MAXHEAP]; } Heaptype; For some reason, this only works if I remove the MAXHEAP (which was #defined). Why? Also, in the main program (which has an #include "sim.h"), the following don't work: Queuetype Qu[MAXPROCS]; char G[MAXPROCS][MAXPROCS], R[MAXPROCS][MAXPROCS]; Queuetype and the others are typedef'd and #defined in sim.h. The error I get with first line there is: Array bounds missing ] in function main. The second line just gives SYNTAX error. Any ideas whad be happening? ./*- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ storm@cs.mcgill.ca McGill University It's 11pm, do YOU Marc Wandschneider Montreal, CANADA know what time it is? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~