diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..1df4412 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,17 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [ + "_DEBUG", + "UNICODE", + "_UNICODE" + ], + "intelliSenseMode": "msvc-x64" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/ASD_Task_2.depend b/ASD_Task_2.depend index 4a87b2d..3fa552f 100644 --- a/ASD_Task_2.depend +++ b/ASD_Task_2.depend @@ -29,3 +29,21 @@ "list.h" "operation.h" +1581236071 source:c:\users\ikramsinapoy\documents\asd_task_2\list.cpp + "list.h" + +1581236071 c:\users\ikramsinapoy\documents\asd_task_2\list.h + + +1581236071 source:c:\users\ikramsinapoy\documents\asd_task_2\main.cpp + + "list.h" + "operation.h" + +1581167771 c:\users\ikramsinapoy\documents\asd_task_2\operation.h + "list.h" + +1581236071 source:c:\users\ikramsinapoy\documents\asd_task_2\operation.cpp + "list.h" + "operation.h" + 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(next(Q)))){ + Q = next(Q); + } + if (next(Q) == NULL){ + P = allocate(x); + insertLast(L,P); + }else if (info(P)!=info(Q)){ + P = allocate(x); + insertAfter(L,P,Q); + } + } + //----------------------------------------