What does that mean in c? char *array[]= { “**”, “**”, “**” };

后端 未结 5 428
花落未央
花落未央 2021-01-13 10:45

In some code that I read, there was an initializing statement like this

char *array[]= { \"something1\", \"something2\", \"something3\" };

5条回答
  •  离开以前
    2021-01-13 11:16

    This defines a array of char pointers (aka. "c strings").

    For accessing the content you could do:

    for (int i=0; i

提交回复
热议问题