diff --git a/Project2/Debug/Project2.log b/Project2/Debug/Project2.log index 864d6f9..cd8193c 100644 --- a/Project2/Debug/Project2.log +++ b/Project2/Debug/Project2.log @@ -1,4 +1,4 @@  main.c - sq_list.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 的类型不同 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 fbd220b..c52f656 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 c48d3ce..56403d6 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 0b3b0a8..8d9524e 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/main.c b/main.c index b105945..5ba5422 100644 --- a/main.c +++ b/main.c @@ -6,8 +6,10 @@ int main(void) { - sq_list list; - init_sq_list(&list); + sq_list *list = init_sq_list(&list); + list->length = 6; + replace_sq_list(list, 2, 5); + print_sq_list(list); printf("Hello World!\n"); return 0; -} \ No newline at end of file +} diff --git a/sq_list.c b/sq_list.c index 7d1351d..b245db8 100644 --- a/sq_list.c +++ b/sq_list.c @@ -7,7 +7,6 @@ sq_list* init_sq_list(sq_list *name) { name = (sq_list*)malloc(sizeof(sq_list)); memset(name, 0, sizeof(sq_list)); - return name; } // ɾ @@ -53,7 +52,7 @@ void insert_sq_list(sq_list* list, int pos, int value) } if (pos == MAX) printf("\n"); - if 9pos > list->length && pos <= MAX) + if (pos > list->length && pos <= MAX) printf("ڴ˴"); int i = list->length; int flog = i;