- 论坛徽章:
- 0
|
#include<stdio.h>
#include<stdlib.h>
typedef struct BiTree_Node{
int data;
struct BiTree_Node *lchild;
struct BiTree_Node *rchild;
}BiTree_Node;
typedef struct QNode{
BiTree_Node *node;
struct QNode *next;
}QNode;
main(){
QNode *p=(QNode *)malloc(sizeof(QNode));
int c=1;
p->node->data=c;
printf("%d n",p->node->data);
} |
./test
Segmentation fault |
|