This repository has been archived on 2024-05-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ABS-Peripheral-Drive/数据结构//main.c
2023-10-18 18:00:04 +08:00

23 lines
328 B
C

#include <stdio.h>
#include "Stack.h"
int main(){
int *a;
SqStack stack;
InitStack(&stack,20,sizeof(int));
for(int i=0;i<20;i++){
a=(int *)PushStack(&stack);
*a=i;
}
for(int i=0;i<20;i++){
printf("%d ",*(int *)(stack.container+i*stack.NodeSize));
}
return 0;
}