From 7935f0fbe0133ec7b29dae0727672f748b8e8ceb Mon Sep 17 00:00:00 2001 From: Jdhggg <24016020834@stu.nsu.edu.cn> Date: Thu, 20 Mar 2025 23:34:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project2/Debug/Project2.log | 2 +- .../Debug/Project2.tlog/CL.command.1.tlog | Bin 2958 -> 2958 bytes Project2/Debug/Project2.tlog/CL.read.1.tlog | Bin 13514 -> 13514 bytes Project2/Debug/Project2.tlog/CL.write.1.tlog | Bin 4354 -> 4354 bytes main.c | 4 ++-- sq_list.c | 4 ++++ 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Project2/Debug/Project2.log b/Project2/Debug/Project2.log index 976bffc..259d036 100644 --- a/Project2/Debug/Project2.log +++ b/Project2/Debug/Project2.log @@ -1,2 +1,2 @@ - sq_list.c + main.c Project2.vcxproj -> C:\code\lencode\Project2\Debug\Project2.exe diff --git a/Project2/Debug/Project2.tlog/CL.command.1.tlog b/Project2/Debug/Project2.tlog/CL.command.1.tlog index 63d02921de1fab87535df6fd4037ea928c5a202a..5c9a976e2c6a6a350957d2dd3674b2b7fd78b10b 100644 GIT binary patch delta 17 ZcmeAZ?-So3$F}(u#}cN^uUOA80RTJg2HF4s delta 25 dcmeAZ?-So3$2Pf+TVS&Xa|IKa@rv~Z698%J2x|ZU diff --git a/Project2/Debug/Project2.tlog/CL.read.1.tlog b/Project2/Debug/Project2.tlog/CL.read.1.tlog index 161a88492354ac7594a396cc8088bac5aa07e7a8..0ee1b329dc02914d2336ef9db6c6adfa2fb365d6 100644 GIT binary patch delta 21 dcmX?=c`9?m64A|msx|zRrBqEeFA*){2LNkJ2zUSh delta 28 kcmX?=c`9?m64A{es%89>6;w?obEyhU^yArlKs13L0IBQ>K>z>% diff --git a/Project2/Debug/Project2.tlog/CL.write.1.tlog b/Project2/Debug/Project2.tlog/CL.write.1.tlog index cd2bbd56fdd2870579d2bf0afea9de24cd9eb5e9..5e17f1198edf405d0a3b628a9a73c293e582d897 100644 GIT binary patch delta 17 YcmZotYEs(Z#J4$)$A@tV!Z diff --git a/main.c b/main.c index ae7d234..856879f 100644 --- a/main.c +++ b/main.c @@ -22,10 +22,10 @@ int main(void) L->length = 10; print_sq_list(N); print_sq_list(L); - printf("----------------------------------"); merge_sq_list(N,L); print_sq_list(L); - printf("%d", L->length); + printf("L->length:[%d]\n", L->length); printf("Hello World!\n"); + system("pause"); return 0; } diff --git a/sq_list.c b/sq_list.c index 658c42f..a4ac840 100644 --- a/sq_list.c +++ b/sq_list.c @@ -72,8 +72,10 @@ void insert_sq_list(sq_list* list, int pos, int value) // ´òÓ¡ void print_sq_list(sq_list* list) { + printf("["); for (int i = 0; i < list->length; i++) printf("%d ", list->data[i]); + printf("]"); printf("\n"); } @@ -107,7 +109,9 @@ void merge_sq_list(sq_list* list_1, sq_list* list_2) } } + printf("----------------------------------\n"); printf("ÓÐ%dÏàͬ ÓÐ%d²»Ïàͬ\n", flog, list_2->length - flog); + printf("----------------------------------\n"); } //if (list_1->data[j] != list_2->data[i])