This commit is contained in:
llz-long 2025-04-17 17:46:05 +08:00
parent 338e927cf8
commit 65499ba86e
2 changed files with 10 additions and 10 deletions

2
.gitignore vendored
View File

@ -53,3 +53,5 @@ dkms.conf
/.vs/Project2 /.vs/Project2
*.tlog *.tlog
*.tlog *.tlog
*.recipe
*.tlog

18
main.c
View File

@ -1,8 +1,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "array_stack.h" #include "linked_list_stack.h"
#include "sq_list.h"
int main(void) int main(void)
{ {
@ -26,14 +25,13 @@ int main(void)
//mer_ge_sq_list(L,N); //mer_ge_sq_list(L,N);
//print_sq_list(L); //print_sq_list(L);
//printf("L->length:[%d]\n", L->length); //printf("L->length:[%d]\n", L->length);
stack_linked* head = init_stack_linked();
push_stack_linked(head, 1);
// Őť˛âĘÔ push_stack_linked(head, 2);
array_stack* stack = init_array_stack(); push_stack_linked(head, 3);
push_array_stack(stack, 1); print_linked(head);
push_array_stack(stack, 2); pop_stack_linked(head);
push_array_stack(stack, 3); print_linked(head);
print_array_stack(stack);
printf("Hello World!\n"); printf("Hello World!\n");
system("pause"); system("pause");
return 0; return 0;