incrementing an array of pointers in C

后端 未结 5 1981
滥情空心
滥情空心 2020-12-20 20:01

this is probably an essentially trivial thing, but it somewhat escapes me, thus far..

char * a3[2];
a3[0] = \"abc\";
a3[1] = \"def\";
char ** p;

5条回答
  •  半阙折子戏
    2020-12-20 20:23

    You can't assign to a3, nor can you increment it. The array name is a constant, it can't be changed.

    c-faq

提交回复
热议问题