From: "Rylan" Newsgroups: comp.os.msdos.djgpp Subject: Problem Accessing Allegro Sprite Struct Members Date: Thu, 2 Jul 1998 17:17:28 +0200 Organization: The South African Internet Exchange Lines: 48 Message-ID: <6nga3s$kqf$1@news2.saix.net> NNTP-Posting-Host: pc25-01-p11.saix.net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Hi All, I'm having a small prob accessing the RLE_SPRITE struct variables. If I have a datafile variable "datafile" I access an item datafile[The_Sprite].dat to put the sprite on the screen. Now what I want to do is to access the "w" and "h" ints defined in typedef struct RLE_SPRITE /* a RLE compressed sprite */ { int w, h; /* width and height in pixels */ int color_depth; /* color depth of the image */ int size; /* size of sprite data in bytes */ signed char dat[0]; /* RLE bitmap data */ } RLE_SPRITE; This would be done by referring to "datafile[The_Sprite].w" right? Only it refuses to compile with the error "structure has no member named 'w' ". How can this be? It is clearly defined in Allegro.h. Am I missing something? The int "size" is easily accessed, I checked, but the compiler refuses to acknowledge the existance of "w" or "h" although they are defined! Can you enlighten me? Any help will be sincerely appreciated! Please reply by mail if at all possible. Fanx!! Kind Regards, Rylan Is truth beauty or is beauty truth? -- Spawned By Rylan Is truth beauty or beauty truth?