diff --git a/ASD_Task_2.depend b/ASD_Task_2.depend index 4a87b2d..db296f2 100644 --- a/ASD_Task_2.depend +++ b/ASD_Task_2.depend @@ -29,3 +29,21 @@ "list.h" "operation.h" +1581162842 source:d:\github\asd_task_2\main.cpp + + "list.h" + "operation.h" + +1581158381 d:\github\asd_task_2\list.h + + +1581151762 d:\github\asd_task_2\operation.h + "list.h" + +1581163057 source:d:\github\asd_task_2\operation.cpp + "list.h" + "operation.h" + +1581163067 source:d:\github\asd_task_2\list.cpp + "list.h" + diff --git a/Main.cpp b/Main.cpp index 297d6ca..e4ccde4 100644 --- a/Main.cpp +++ b/Main.cpp @@ -34,7 +34,7 @@ int main() { //================================================== // TEST INSERT AFTER P = findElm(L, 6); - insertLast(L, allocate(5)); + insertAfter(L,P, allocate(5)); printInfo(L); cout<<"output should be: 8, 3, 6, 5, 4, 2,"<info(Q))) + { + Q = next(Q) ; + } + if (info(Q) != x) + { + if (x > info(Q)) + { + insertLast(L,P) ; + } + else if (x < info(Q)) + { + insertFirst(L,P) ; + } + else + { + insertAfter(L,Q,P) ; + } + } //---------------------------------------- + } }