我想在struct中有一个数组,它将存储相同数据类型(即struct map)的指针.我查看了Stackoverflow,发现了这个:
struct map {
int city;
struct map **link = (struct map *)malloc(204800 * sizeof(struct map *));
}
Run Code Online (Sandbox Code Playgroud)
但是我收到了这个错误: -
error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
struct map **link = (struct map *)malloc(204800*sizeof(struct map *));
Run Code Online (Sandbox Code Playgroud)