Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!boulder!pratt From: pratt@boulder.Colorado.EDU (Jonathan Pratt) Newsgroups: comp.sys.mac.programmer Subject: Re: Problems With Menus Summary: Arrays in C index from zero... Message-ID: <6235@boulder.Colorado.EDU> Date: 29 Jan 89 18:28:20 GMT References: <8534@orstcs.CS.ORST.EDU> <6400@hoptoad.uucp> Sender: news@boulder.Colorado.EDU Reply-To: pratt@boulder.Colorado.EDU (Jonathan Pratt) Organization: University of Colorado, Boulder Lines: 15 In article <6400@hoptoad.uucp> tim@hoptoad.UUCP (Tim Maroney) writes: >In article <8534@orstcs.CS.ORST.EDU> borcelf@jacobs.cs.orst.edu (Fernando >Borcel) writes: >> >> for (i=1; i>NumOfMenus;i++) >> InsertMenu(MyMenus[i],0); > >I wish they were all this easy! Use a less than sign, not a greater than >sign. The loop is quitting right away, so the menu doesn't get installed; The summary line says it all; you must also change the intialization of the "for" to i=0. (And fix the enum, etc. to reflect this) Jonathan pratt@boulder.colorado.edu