From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Ignore this post Date: 5 Aug 2003 09:32:15 GMT Organization: Aachen University of Technology (RWTH) Lines: 31 Message-ID: References: <84e4e2a9 DOT 0308042001 DOT 6f4d7231 AT posting DOT google DOT com> <20030805022123 DOT 16575 DOT 00000008 AT mb-m25 DOT aol DOT com> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1060075935 5914 137.226.32.75 (5 Aug 2003 09:32:15 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 5 Aug 2003 09:32:15 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com JBS30000 wrote: > I figured out the problem. The array goes 0-5, 0-6, 0-5 but I was > supposed to put unsigned char Dither[6][7][6]; Like I said, the > answer was very obvious. Sorry about that. Nothing to be sorry about. Here's another suggestion to improve the quality of that source code a bit: 1) lose those tons of commented-out numbers. They really make the code hard to read for no apparent gain. 2) You have an array of arrays of arrays of numbers, here, but your initializer doesn't reflect that. The language does allow the way you did it, overflowing from one sub-array into the next, but it's not particularly good style. Instead, consider unsigned char Dither [6][7][6] = { { { first sub-sub-array}, { second sub-sub-array} }, { {first sub-sub-array in second sub-array}, { ... } }, { ... } }; The indentation is just visual sugar, but the additional pairs of { } provide real value --- they'll make it harder to miscount entries inside the array. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.