[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] C Programming Question
- Subject: [ale] C Programming Question
- From: eric.ayers at mindspring.com (Eric Z. Ayers)
- Date: Sun, 11 Mar 2001 11:54:55 -0500
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.