#include <stdio.h>
struct ST {
int data;
//......
};
struct NestST {
struct InnerST {
int iData;
};
int data;
//......
};
int main() {
struct ST st1={15};
struct NestST st3={25,35};
struct InnerST st4={45};
printf("st1.data=%d\n",st1.data);
printf("st3.iData=%d,st3.data=%d\n",st3.iData,st3.data);
printf("st4.iData=%d\n",st4.iData);
return 0;
}
这段代码为什么在c编译器上没问题,在c++上就有问题呢?谢谢回答。。
Youare_my_sunshine