Message-Id: Date: Sat, 25 Oct 1997 23:03:49 +0200 To: jamie DOT love AT clear DOT net DOT nz, djgpp AT delorie DOT com References: <199710250713 DOT UAA05511 AT fep1-orange DOT clear DOT net DOT nz> Subject: Re: arrays of pointers MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT From: Georg DOT Kolling AT t-online DOT de (Georg Kolling) Precedence: bulk Jamie Love schrieb: > Hi, my mind is blank to the way to do the following. > > What i want is an array of five DATAFILE pointers (of Allegro type) > > At the moment i have DATAFILE *tiledata; > > and i want to do it so that i can access one of five datafiles in a quick > array something like: > > DATAFILE *tiledata[5]; > > I know this is wrong as it doesn't seem to work. Sorry, but this isn't wrong at all... This gives you an array of five not initialized pointers to DATAFILE structures > > also, how to i access the data stored in the data array when i do use the > array of pointers > > is it like: > > tiledata[arraypointernum][datanum].dat; > > or what? Exactly that should work... remenber to use tiledata[0] = load_datafile("dat1.dat"); tiledata[1] = load_datafile("dat2.dat"); ...