2025-02-15
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user