delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/06/13:13:42

From: Steve Chapel <schapel AT utilicom DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Why won't this program run?
Date: Fri, 06 Nov 1998 09:44:54 -0800
Organization: Utilicom, Inc.
Lines: 44
Message-ID: <36433596.445AFC73@utilicom.com>
References: <199811052339 DOT SAA21629 AT delorie DOT com>
NNTP-Posting-Host: 207.33.43.138
Mime-Version: 1.0
X-Trace: sienna.impulse.net 910374295 18385 207.33.43.138 (6 Nov 1998 17:44:55 GMT)
X-Complaints-To: abuse AT impulse DOT net
NNTP-Posting-Date: 6 Nov 1998 17:44:55 GMT
X-Mailer: Mozilla 4.5 [en] (Win95; U)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

This is a multi-part message in MIME format.
--------------A50859B0A3FF7BAC5DFCCBF9
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Eab AT salnet DOT org wrote:
> 
> I've been having some trouble.  The attached C source file compiled, but
> the instant I attempt to run it, it quits.  Does anybody have any ideas
> as to why I'm having trouble?

        int numlines=10;
        input=(char **)malloc(10);

Shouldn't that be
        input = (char **)malloc(numlines * sizeof(char **));
as written, your program allocates 10 bytes, not room for 10 char **'s.

This question really doesn't have anything to do with DJGPP, and should
really be posted to a more appropriate group such as comp.lang.c.
--------------A50859B0A3FF7BAC5DFCCBF9
Content-Type: text/x-vcard; charset=us-ascii;
 name="schapel.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Steve Chapel
Content-Disposition: attachment;
 filename="schapel.vcf"

begin:vcard 
n:Chapel;Steve
tel;fax:(805) 964-5706
tel;work:(805) 964-5848 x227
x-mozilla-html:TRUE
url:http://www.utilicom.com/
org:Utilicom, Inc. Spread Spectrum Communications
adr:;;323 Love Place;Santa Barbara;CA;93117-3289;USA
version:2.1
email;internet:schapel AT utilicom DOT com
title:Software Engineer
fn:Steve Chapel
end:vcard

--------------A50859B0A3FF7BAC5DFCCBF9--

- Raw text -


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