incrementing an array of pointers in C

后端 未结 5 1972
滥情空心
滥情空心 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:20

    a3 is a constant pointer, you can not increment it. "p" however is a generic pointer to the start of a3 which can be incremented.

提交回复
热议问题