Access original data from array
Moritz Warning
moritzwarning at web.de
Wed Sep 30 19:14:41 PDT 2009
Hi,
how can I access the original value for xs?
I assume that xs is allocated at program start,
because I don't get an access violation on gnu/linux
when I reassign values.
But how can I access the original value?
Do I have to keep a copy before xs is modified?
import tango.io.Stdout;
void main(char[][] args)
{
static char[][2] xs = ["abc", "123"];
xs[0] = "foo";
xs[1] = "bar";
foreach(x; xs)
{
Stdout(x).newline;
}
//how to print "abc" "123" now?
}
More information about the Digitalmars-d-learn
mailing list