[ale] C Programming Question
Eric Z. Ayers
eric.ayers at mindspring.com
Sun Mar 11 11:54:55 EST 2001
JB Wells wrote:
>
> I think this will work:
>
> char **a=(char **)malloc (sizeof(char **));
^^ You need to change this line:
char **a=(char **)malloc (sizeof(char **) * WHATEVER);
>
> for (i=0; i<WHATEVER; i++)
> {
> /* if the pointer will be pointing to a string,
> you should change it to
> (char *)malloc(sizeof(char) * strlen(STRING))*/
>
> a[i]=(char *)malloc(sizeof(char *));
> }
>
> =====
> --------------------------
> John B. Wells IV
> Application Developer
> Acterna
> 6100 Lake Forrest Drive
> Atlanta, GA 30328
> 404.531.8938
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
> --
> To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list