www.delorie.com/archives/browse.cgi | search |
Date: | Sun, 10 Nov 1996 15:28:23 +0200 (IST) |
From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
To: | Fletcher Matlock <fletch AT netdoor DOT com> |
Cc: | djgpp AT delorie DOT com |
Subject: | Re: array of pointers to strings, BC++, DJGPP and weird printing , behavior |
In-Reply-To: | <199611091600.KAA08591@netdoor.com> |
Message-Id: | <Pine.SUN.3.91.961110152547.8417U-100000@is> |
Mime-Version: | 1.0 |
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.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |