X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Cesar Rabak Newsgroups: comp.os.msdos.djgpp Subject: Re: Trouble of using very large arrays Date: Fri, 23 Apr 2004 14:59:00 -0300 Lines: 24 Message-ID: <40895964.8080105@acm.org> References: <4088E94D DOT 8070508 AT acm DOT org> NNTP-Posting-Host: 241132.virtua.com.br (200.182.241.132) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1082743140 10765724 I 200.182.241.132 ([39218]) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: pt-br, pt To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Martin Ambuhl escreveu: > Cesar Rabak wrote: > >> Brian Inglis escreveu: > > >> > this is cleaner and more maintainable: >> > >> > a = malloc(rows * columns * sizeof *a); >> > >> This is not a good advice: you're changing the allocation of an object >> of (rows x columns) ints to another of (rows x columns) pointers to int. > > > You are, I regret to say, in error. Thanks for the deference! I in fact got trapped by the idiom as Chuck observed as well. The code as written is syntactically correct. -- Cesar Rabak