24 lines
279 B
C
24 lines
279 B
C
#include <stdio.h>
|
|
/*
|
|
定义结构体类型
|
|
*/
|
|
|
|
typedef struct Node{
|
|
int data;
|
|
struct Node * pNext;
|
|
}Node, *pNode;
|
|
|
|
|
|
int main(){
|
|
|
|
Node node;
|
|
pNode p;
|
|
p = &node;
|
|
node.data = 10;
|
|
node.pNext = NULL;
|
|
|
|
printf("%d\n", p->data);
|
|
|
|
|
|
return 0;
|
|
} |