完成双链表、循环链表、静态链表

This commit is contained in:
lifei
2020-11-30 20:53:00 +08:00
parent fc8d9fea74
commit 9511bbb4b2
8 changed files with 645 additions and 3 deletions

24
ch2/static-link/with.cpp Normal file
View File

@@ -0,0 +1,24 @@
#include <stdio.h>
#include <stdlib.h>
#define MaxSize 10
struct Node
{
int data;
int next;
};
typedef struct
{
int data;
int next;
} SLinkList[MaxSize];
int main()
{
struct Node x;
printf("sizeX=%d\n", sizeof(x));
struct Node a[MaxSize];
printf("sizeA=%d\n", sizeof(a));
SLinkList b;
printf("sizeB=%d\n", sizeof(b));
return 0;
}