delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/03/07:24:16

From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DJGPP malloc problem
Date: Fri, 03 Mar 2000 11:01:39 +0200
Organization: NetVision Israel
Lines: 24
Message-ID: <38BF7F73.CAEBED9A@is.elta.co.il>
References: <89n24n$5rq$1 AT news DOT koti DOT tpo DOT fi>
NNTP-Posting-Host: ras1-p63.rvt.netvision.net.il
Mime-Version: 1.0
X-Trace: news.netvision.net.il 952074166 28113 62.0.172.65 (3 Mar 2000 09:02:46 GMT)
X-Complaints-To: abuse AT netvision DOT net DOT il
NNTP-Posting-Date: 3 Mar 2000 09:02:46 GMT
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en,ru,hebrew
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Toni Riikonen wrote:
> 
> BUT, when i'm trying to, for example, print something out of these
> structures, my computer crashes, or boots up!
> 
> This is what i'm trying to do..
> 
> ----------------------------------------------
> int main()
> {
>     int a;
>     object_type object;
>     InitObject(&object, 50);
>     for(a = 0;a < object.faces; a++) {
>         gotoxy(1,1+a);
>         printf("%1.1f\n",object.face[a].vertex[0].rx);
>     }
>     free(object.face);
>     return 0;
> }
> --------------------------------------------------

There's no declaration or initialization of the vertex[] array in the above
code.  Is this the real program you compiled and tried to run?

- Raw text -


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