www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/07/12/04:49:22

From: "Filip Sielimowicz" <sielim AT wp DOT pl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Alocating Memory to a Referenced Pointer!
Date: Fri, 12 Jul 2002 09:21:21 +0200
Organization: ASK NorthPark http://www.npnet.org
Lines: 30
Message-ID: <agm082$vts$1@wulkan.npnet.org>
References: <k7rX8.33294$Hj3 DOT 100060 AT newsfeeds DOT bigpond DOT com>
NNTP-Posting-Host: inthands2.hands.com.pl
X-Trace: wulkan.npnet.org 1026458691 32700 213.195.166.210 (12 Jul 2002 07:24:51 GMT)
X-Complaints-To: usenet AT npnet DOT org
NNTP-Posting-Date: Fri, 12 Jul 2002 07:24:51 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Check the code again. This below is the real copy ?
It's wrong !

It should be:
 int F_Allocate_Mem(char **v_string)
 {
     *v_string=(char *) malloc (200 *sizeof(char));
 };

> int F_Allocate_Mem(char *v_string)
> {
>     v_string=(char *) malloc (200 *sizeof(char));
> };
>
> void main ()
> {
>     char * BigStringVariable;
>     int response;
>     response=F_Allocate_Mem(&BigStringVariable);
>     exit(0);
> };
>

--
Filip Sielimowicz
http://panda.bg.univ.gda.pl/~sielim
----



- Raw text -


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