diff --git a/ASD_Task_2.depend b/ASD_Task_2.depend index 4a87b2d..96287f7 100644 --- a/ASD_Task_2.depend +++ b/ASD_Task_2.depend @@ -29,3 +29,21 @@ "list.h" "operation.h" +1581242889 source:c:\users\asus\documents\github\asd_task_2\operation.cpp + "list.h" + "operation.h" + +1581237907 c:\users\asus\documents\github\asd_task_2\list.h + + +1580831697 c:\users\asus\documents\github\asd_task_2\operation.h + "list.h" + +1581242548 source:c:\users\asus\documents\github\asd_task_2\main.cpp + + "list.h" + "operation.h" + +1581242097 source:c:\users\asus\documents\github\asd_task_2\list.cpp + "list.h" + diff --git a/ASD_Task_2.layout b/ASD_Task_2.layout index e69ac9c..e05be76 100644 --- a/ASD_Task_2.layout +++ b/ASD_Task_2.layout @@ -7,6 +7,11 @@ + + + + + @@ -22,9 +27,4 @@ - - - - - diff --git a/Main.cpp b/Main.cpp index 297d6ca..d0d6ae0 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(next(Q)))){ + Q = next(Q); + if (next(Q) == NULL){ + P = allocate(x); + insertLast(L,P); + }else if (info(P)!=info(Q)&& (findElm(L,x)==NULL)){ + P = allocate(x); + Q = findElm(L,x); + insertAfter(L,Q,P); + } + } + + } //---------------------------------------- }