Multi-dimensional null-character arrays

I wanted to know if you can have a multi-dimensional null-character array and how you would go about assigning strings to them. i know how to convert null-character arrays to strings, but not the other way around. is it even possible?
Yes - you can have an array of an array of an array of an array...of an array of anything. It's certainly possible.

EDIT: oh, I guess you wanted to know how to do it. Here is an example:
1
2
3
4
5
6
unsigned long NumStrings = /*number of c-strings you want*/;
char **ArrayOfCStrings = new char*[NumStrings];
for(unsigned long i = 0; i < NumStrings; ++i)
{
  ArrayOfCStrings[i] = "Hello, Affinity!"; //or whatever
}
Last edited on
Thank you L B. that was helpful :)
Topic archived. No new replies allowed.