Turbo C 2.0 Problem with Array
LMS5 at PSUVM.BITNET
LMS5 at PSUVM.BITNET
Sat Dec 9 23:00:04 AEST 1989
Maybe I have been staring at my PC too long and can't see the forest
through all those d**n trees! But this is really getting on my nerves.
It seems that when I insert a value directly into a function ie..
getimage(0,0,8,10,buffer);
the compiler throws me out with an octal error on the eight. If I declare an
interger say 'i' and do this...
i=8; getimage(0,0,i,10,buffer);
I am OK. This bothered me a little but since I could get around it I
didn't mind too much...HOWEVER...Now I need to declare this:
struct list {
int minx, miny;
int color1, color2;
char name <10>; /*no square brackets on and ibm 3178 */
};
static struct list array <18>={
{12,12,07,05,"3178.img"},
{11,11,04,06,"3044.img"},
....etc...
};
The problem is when I compile I get an octal error on the eigth record! There
are no 8's or 9's in the integer fields so the only thing I can think of is
that it is flagging on the index value? But the index starts at 0 so it should
flag me at the nineth record. If I shorten the array to seven records and com-
ment out the rest I am fine. No matter what order I put the records in it made
no difference. The eighth record was always flagged. Aside from splitting
my data into 3 separate 6 record arrays, does anyone have any suggestions?????
Am I doing something so obviously wrong I can't see it???
Thanks in Advance.....
Laurie Salopek (LMS5 at PSUVM)
More information about the Comp.lang.c
mailing list