From: "Damian Yerrick" Newsgroups: comp.os.msdos.djgpp Subject: Re: Please help...matrix problem with Allegro Date: Fri, 8 Oct 1999 16:20:04 -0500 Organization: Rose-Hulman Institute of Technology Lines: 18 Message-ID: <7tln9o$6ue$1@solomon.cs.rose-hulman.edu> References: NNTP-Posting-Host: 137.112.205.146 X-Trace: solomon.cs.rose-hulman.edu 939417720 7118 137.112.205.146 (8 Oct 1999 21:22:00 GMT) X-Complaints-To: news AT cs DOT rose-hulman DOT edu NNTP-Posting-Date: 8 Oct 1999 21:22:00 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com George Kinney wrote in message news:DB85AFBE7C0DD311BF260004ACB80BFCEC34 AT nex_server DOT nextransport DOT com... > >What do you mean initialize to zero? Do you mean like matrix[x][y] = 0 > >or do something else? > > You could, but: > memset( matrix, 0, [[matrix x-size] * [matrix y-size]] ) > would be quicker. > Provided your matrix is of chars. A more general method: memset(matrix, 0, sizeof(matrix));