举例如下:
typedef struct
{
int a;
int b;
}Astruct;
typedef struct
{
int a;
int b;
}Bstruct;
typedef struct
{
int a;
int b;
}Cstruct;
typedef struct
{
Astruct MyA;
Bstruct Myb;
}MyABstruct;
typedef struct
{
MyABstruct MyAB;
Cstruct c;
}MyABCstruct;
MyABCstruct MyABC;
这样的话:MyABC.MyAB.MyA.a总共嵌套四层,那C语言中像这样最多允许嵌套多少层呢?
应该没有上限
就像类的继承
感觉没有必要弄太多 还乱
看不同的编译器吧。turbo c都能嵌套16层,那么现在的编译器绝对远远大于这个。