diff --git a/ASD_Task_2.depend b/ASD_Task_2.depend index 4a87b2d..ea32629 100644 --- a/ASD_Task_2.depend +++ b/ASD_Task_2.depend @@ -29,3 +29,22 @@ "list.h" "operation.h" +1581160608 source:/Users/760007/Documents/Kuliah/StrukDat/ASD_Task_2/operation.cpp + "list.h" + "operation.h" + +1581077172 /Users/760007/Documents/Kuliah/StrukDat/ASD_Task_2/list.h + + +1581047543 /Users/760007/Documents/Kuliah/StrukDat/ASD_Task_2/operation.h + "list.h" + +1581161061 source:/Users/760007/Documents/Kuliah/StrukDat/ASD_Task_2/Main.cpp + + "list.h" + "operation.h" + +1581163112 source:/Users/760007/Documents/Kuliah/StrukDat/ASD_Task_2/list.cpp + + "list.h" + diff --git a/ASD_Task_2.layout b/ASD_Task_2.layout index e69ac9c..a35dfe7 100644 --- a/ASD_Task_2.layout +++ b/ASD_Task_2.layout @@ -1,30 +1,29 @@ - - + - + - + - + - + - + - + - + - + - + diff --git a/Main.cpp b/Main.cpp index 297d6ca..f3dfaf8 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(Prec)){ + Prec=next(Prec); + } + if (x!=info(Prec)){ + if(x>info(Prec)){ + insertLast(L, P); + } else if(x