www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/11/11/03:51:05

Date: Mon, 11 Nov 1996 02:34:53 -0600 (CST)
From: Ely Wilson <fletch AT netdoor DOT com>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: djgpp AT delorie DOT com
Subject: Re: array of pointers to strings, BC++, DJGPP and weird printing , behavior
In-Reply-To: <Pine.SUN.3.91.961110152547.8417U-100000@is>
Message-ID: <Pine.GSO.3.94.961111023101.13027B-100000@netdoor.com>
MIME-Version: 1.0


On Sun, 10 Nov 1996, Eli Zaretskii wrote:

> 
> On Sat, 9 Nov 1996, Fletcher Matlock wrote:
> 
> > : > 	KeyWords = (char **) malloc ( sizeof(char) );
> > I've never seen this     ^^ before, what did I miss and when?
> 
> This is the proper way to allocate memory for an array of pointers to 
> char.  `malloc' returns a void pointer, and you should always cast it to 
> a proper type before using the result.
> 
Okay...I *MUST* be a genius then, because I already knew that...let me
clarify..I've seen, used and even explained type casting in numerous
situations, I've also seen, used and even explaine dthe purpose and
methods behind allocating memory for arrays of..well...anything I need
arrays of...what I don't recognize is that double asterisk..*THAT* I've
never seen...which is what I was referring to..so, what did I miss, if
anything, and when?  DJGPP doesn't lend much to online syntax referral,
in any way(that I know).

- pleXus -




- Raw text -


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