diff --git a/Project2/Debug/Project2.log b/Project2/Debug/Project2.log index cd8193c..10bca46 100644 --- a/Project2/Debug/Project2.log +++ b/Project2/Debug/Project2.log @@ -1,4 +1,3 @@ - main.c -C:\code\lencode\Project2\main.c(9,34): warning C4047: “函数”:“sq_list *”与“sq_list **”的间接级别不同 -C:\code\lencode\Project2\main.c(9,34): warning C4024: “init_sq_list”: 形参和实参 1 的类型不同 + sq_list.c +C:\code\lencode\Project2\sq_list.c(10,1): warning C4716: “init_sq_list”: 必须返回一个值 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 ce6de68..9ca4aac 100644 Binary files a/Project2/Debug/Project2.tlog/CL.command.1.tlog and b/Project2/Debug/Project2.tlog/CL.command.1.tlog differ diff --git a/Project2/Debug/Project2.tlog/CL.read.1.tlog b/Project2/Debug/Project2.tlog/CL.read.1.tlog index 10b84e4..d321be2 100644 Binary files a/Project2/Debug/Project2.tlog/CL.read.1.tlog and b/Project2/Debug/Project2.tlog/CL.read.1.tlog differ diff --git a/Project2/Debug/Project2.tlog/CL.write.1.tlog b/Project2/Debug/Project2.tlog/CL.write.1.tlog index 2d403bc..d4dd94b 100644 Binary files a/Project2/Debug/Project2.tlog/CL.write.1.tlog and b/Project2/Debug/Project2.tlog/CL.write.1.tlog differ diff --git a/sq_list.c b/sq_list.c index 9325888..731f6b8 100644 --- a/sq_list.c +++ b/sq_list.c @@ -54,9 +54,9 @@ void insert_sq_list(sq_list* list, int pos, int value) printf("\n"); if (pos > list->length && pos <= MAX) printf("ڴ˴"); - int i = list->length; + int i = list->length -1; int flog = i; - for (i; i > pos; i--) + for (i; i >= pos-1; i--) { list->data[i + 1] = list->data[i]; }