| www.delorie.com/archives/browse.cgi | search |
| Message-Id: | <199909020524.BAA21825@delorie.com> |
| From: | "Dan Gold" <TedMat AT CoastNet DOT com> |
| To: | <djgpp AT delorie DOT com> |
| Subject: | How to make allocate an array of strings? |
| Date: | Thu, 2 Sep 1999 04:32:54 -0700 |
| X-MSMail-Priority: | Normal |
| X-Priority: | 3 |
| X-Mailer: | Microsoft Internet Mail 4.70.1155 |
| MIME-Version: | 1.0 |
| Reply-To: | djgpp AT delorie DOT com |
Okay this is a stupid newbie question but I never actually learned how it
was done, mayby better suited for a C programming group but I want to
allocate an array of strings. I understand how to use strings but not
create them and not multi-dimensional strings. Could someone please give
me an example, the array will hold a list of filenames?
// one dimensional
char * string = (char *)malloc(string_size * sizeof(char));
// two dimensional
??
Thanks from ((--Dan|Gold--))
ps: "Does anyone know of a really comprehensive more advanced C programming
book?" All I see now of days are C++ books.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |