arrays and pointers & Tango
bearophile
bearophileHUGS at lycos.com
Thu Sep 4 09:55:54 PDT 2008
Nick B:
> I would like to create a dynamic array, of say, 10 strings.
In D by default strings are dynamic arrays of characters. You can also use normal C strings, with a \0 at the end, using the appropriate C string functions, but then you have to be careful when you print them, etc.
> I would like to use pointers if possible,
If this means you want to use C-like pointers to arrays of chars you can define it like this:
char*[] arr;
But in most situations you don't want that.
> to show the relationships between the strings, like as follows:
I don't understand.
> Is this possible using Tango ?
I think Tango or Phobos matter little for this, but I can't be sure because I haven't understood what you want.
You can also try the #d or #d.tango IRC channels, where you can ask things with more interactivity.
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list