From: Peter Danielsson Newsgroups: comp.os.msdos.djgpp Subject: Help! Why is my program crashing? Date: Tue, 16 Jun 1998 16:17:39 +0200 Organization: student Lines: 23 Message-ID: <35867E83.E01@efd.lth.se> Reply-To: e96pd AT efd DOT lth DOT se NNTP-Posting-Host: cie96ojo.student.lth.se Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Why does my program crash all the time. It's a simple program, only a few lines: int WIDTH=513; int *mapheight; void initmapheight(int *n)//allocateing memory { n=(int*)calloc((long)513*513,sizeof(int)); if(n==NULL) exit(-1); } void reset(int *m,int W2)//set to zero. Here it crashes { for(int a5=0;a5