delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/12/15:55:19

From: XXguille AT XXiies DOT XXes (Guillermo Rodriguez Garcia)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Bug report
Date: Sat, 12 Jun 1999 19:03:40 GMT
Organization: Telefonica Transmision de Datos
Lines: 27
Message-ID: <3761525d.1502026@noticias.iies.es>
References: <002301beb1c6$025023c0$4d806ec3 AT marte>
NNTP-Posting-Host: iies232.iies.es
Mime-Version: 1.0
X-Newsreader: Forte Agent 1.5/32.451
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

El día Tue, 8 Jun 1999 17:45:58 +0200, "Giuseppe Santonocito"
<incom AT mclink DOT it> escribió:

>#include <stdio.h>
>#include <stdlib.h>
>
>void *array[2000];
>int cmp_func( const void *, const void * );
>
>main()
>{
>   int i;
>   FILE *f;
>
>   // fill in the array
>   for( i=0; i<2000; i++ )
>      array[i] = (void *) i;
>

I guess this is a stripped version of the original prog, but you
should malloc memory for array before you start writing data to it.

Regards,
G.
----
Guillermo Rodriguez Garcia
XXguille AT XXiies DOT XXes (ya sabes :-)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019