为什么程序一运行就崩了
#include <stdio.h> #include <stdlib.h> struct a { int t; }; struct n { struct a b; struct n *next; }; struct n * head; int main() { head->b.t=1; return 0; }
为什么程序一运行就崩了
#include <stdio.h> #include <stdlib.h> struct a { int t; }; struct n { struct a b; struct n *next; }; struct n * head; int main() { head->b.t=1; return 0; }
结构体指针没初始化
我搞好了,谢谢大佬