Constant strings in C++ are not generally writable; however, it's
perfectly acceptable to define arrays of characters that you can change:
char x[][2] = {"a", "b", "c"};
"x" should be a 2D array, whose type is effectively char*, it looks to
me exactly the same as
char* x[] = {"a", "b", "c"};
No, the first element of 'x' has two characters.
If there's a multi-dimensional array "a" (say 2D), then "a"'s type can
always be regarded as some pointer type. for the example above, "a" is
a 2D array, and it's type is char*. Is this not right?
No, if you pass it to a function, it's more likely to be treated as
"(char*)[2]"--a pointer to two characters.
The two constructs are fundamentally different.
This
char * x[] = {"a", "b", "c"};
creates three pointers that point to the various strings.
This
char * x[][2] = {"a", "b", "c"};
is the same as saying this,
char * x[3][2] = {"a", "b", "c"};
, and it creates no pointers. The data to create the strings is laid out
in memory, and the compiler remembers where each of the strings begin.