我意识到这可能以前已经完成了,但是对于这种特定的皱纹,搜索却变成了空白。
如果我们想定义一个包含一些字符串的数组,我们可以这样做:
char *strings[] = {"one","two","three"};
如果我们想定义一个字符串数组,我们可以这样做:
char *strings[][] =
{
{"one","two","three"},
{"first","second","third"},
{"ten","twenty","thirty"}
};
但我似乎不能这样做:
char *strings[][] =
{
{"one","two"},
{"first","second","third","fourth","fifth"},
{"ten","twenty","thirty"}
};
这样做会引发编译器错误。
(多维数组中的字符串初始化示例)