【发布时间】:2015-01-03 12:28:06
【问题描述】:
#include<stdio.h>
struct parent{
int a;
int b;
struct child{
char*c ;
} c = {"child"};
} p = {1,2};
void main()
{}
为什么上面的代码会导致编译错误?
【问题讨论】:
-
因为它是无效的 C 代码并且错误是编译器用来告诉你的方法?
-
如果上面的代码编译成功,你应该发布一个问题,这将是世界末日的标志。
-
你想用你的代码获得什么?
标签: c compilation nested structure