From 9b9db0edf8c298d632a8a0da34819d9b5a91af80 Mon Sep 17 00:00:00 2001 From: MinyazevR Date: Wed, 17 Nov 2021 14:55:44 +0300 Subject: [PATCH 1/5] changed the work with errors --- List/List/List.c | 60 ++++++++++++++++--------- List/List/List.h | 16 +++++-- List/List/TestList.c | 105 +++++++++---------------------------------- 3 files changed, 72 insertions(+), 109 deletions(-) diff --git a/List/List/List.c b/List/List/List.c index ba1275a..a37a4f9 100644 --- a/List/List/List.c +++ b/List/List/List.c @@ -67,12 +67,16 @@ void removeElement(Position* position, List* list) free(position); } -Position* first(List* list, int* error) +Position* first(List* list, Error* error) { + if (*error != NOT_ERROR) + { + return NULL; + } Position* position = malloc(sizeof(Position)); if (position == NULL) { - *error = 3; + *error = INSUFFICIENT_MEMORY; return NULL; } position->position = list->head; @@ -96,32 +100,38 @@ bool last(Position* position) return position->position->next == NULL; } -int get(List* list, Position* position, int* error) +int get(List* list, Position* position, Error* error) { - *error = 0; + if (*error != NOT_ERROR) + { + return 0; + } if (position->position == NULL) { - *error = 6; + *error = ELEMENT_IS_MISSING; return 0; } return position->position->value; } -Position* find(int value, List* list, int* error) +Position* find(int value, List* list, Error* error) { - *error = 0; + if (*error != NOT_ERROR) + { + return NULL; + } if (list->head == NULL) { - *error = 6; + *error = EMPTY_LIST; return NULL; } if (value < list->head->value) { - *error = 5; + *error = ELEMENT_IS_MISSING; return NULL; } Position* position = first(list, error); - if (*error == 3) + if (*error == INSUFFICIENT_MEMORY) { return NULL; } @@ -129,13 +139,13 @@ Position* find(int value, List* list, int* error) { if (position->position->value == value) { - *error = 8; + *error = POSITION_FOUND; } next(position); } if (position->position->value == value) { - *error = 8; + *error = POSITION_FOUND; } if (position->position == list->head || position->position->next == NULL && position->position->value <= value) { @@ -145,40 +155,50 @@ Position* find(int value, List* list, int* error) return position; } -Position* findPosition(int value, List* list, int* error) +Position* findPosition(int value, List* list, Error* error) { - *error = 0; + if (*error != NOT_ERROR) + { + return NULL; + } Position* position = find(value, list, error); - if (*error == 8) + if (*error == POSITION_FOUND) { + *error = NOT_ERROR; return position; } - *error = 6; + *error = ELEMENT_IS_MISSING; return NULL; } -void add(List* list, int value, int* error) +void add(List* list, int value, Error* error) { + if (*error != NOT_ERROR) + { + return; + } ListElement* element = malloc(sizeof(ListElement)); if (element == NULL) { - *error = 3; + *error = INSUFFICIENT_MEMORY; return; } element->value = value; Position* position = find(value, list, error); - if (*error == 6) + if (*error == EMPTY_LIST) { list->head = element; element->next = NULL; + *error = NOT_ERROR; free(position); return; } - if (*error == 5) + if (*error == ELEMENT_IS_MISSING) { element->next = list->head; list->head->previous = element; list->head = element; + *error = NOT_ERROR; free(position); return; } diff --git a/List/List/List.h b/List/List/List.h index 3096be4..4dda4fa 100644 --- a/List/List/List.h +++ b/List/List/List.h @@ -6,6 +6,14 @@ typedef struct List List; // Structure describing the position of an item in the list typedef struct Position Position; +typedef enum Error +{ + NOT_ERROR, + EMPTY_LIST, + INSUFFICIENT_MEMORY, + ELEMENT_IS_MISSING, + POSITION_FOUND +} Error; // Function for creating a list List* createList(); @@ -13,10 +21,10 @@ List* createList(); void deleteList(List* list); // Function for adding an item to a list -void add(List* list, int value, int* error); +void add(List* list, int value, Error* error); // Function for finding a pointer to the first element -Position* first(List* list, int* error); +Position* first(List* list, Error* error); // Function to remove an item from the list void removeElement(Position* position, List* list); @@ -25,10 +33,10 @@ void removeElement(Position* position, List* list); Position* next(Position* position); // Function for finding a pointer to an element -Position* findPosition(int value, List* list, int* error); +Position* findPosition(int value, List* list, Error* error); // Function for finding an element -int get(List* list, Position* position, int* error); +int get(List* list, Position* position, Error* error); // Function for printing a list void print(List* list); diff --git a/List/List/TestList.c b/List/List/TestList.c index 5caac80..a810c3c 100644 --- a/List/List/TestList.c +++ b/List/List/TestList.c @@ -4,41 +4,23 @@ // Function to check the function that adds an item to the list bool testAdd() { - int error = 0; + Error error = NOT_ERROR; List* newList = createList(); add(newList, 20, &error); add(newList, 30, &error); add(newList, 10, &error); add(newList, 40, &error); - if (error == 3) + if (error != NOT_ERROR) { deleteList(newList); return false; } Position* position = first(newList, &error); const int firstNumberValue = get(newList, position, &error); - if (error == 6) - { - freePosition(position); - deleteList(newList); - return false; - } const int secondNumberValue = get(newList, next(position), &error); - if (error == 6) - { - freePosition(position); - deleteList(newList); - return false; - } const int thirdNumberValue = get(newList, next(position), &error); - if (error == 6) - { - freePosition(position); - deleteList(newList); - return false; - } const int fourthNumberValue = get(newList, next(position), &error); - if (error == 6) + if (error != NOT_ERROR) { freePosition(position); deleteList(newList); @@ -52,29 +34,19 @@ bool testAdd() // Function to check the function that deletes the first item in the list bool testRemoveHead() { - int error = 0; + Error error = NOT_ERROR; List* newList = createList(); add(newList, 10, &error); add(newList, 20, &error); - if (error == 3) + if (error != NOT_ERROR) { deleteList(newList); return false; } removeElement(findPosition(10, newList, &error),newList); - if (error == 6 || error == 3) - { - deleteList(newList); - return false; - } Position* position = first(newList, &error); - if (error == 3) - { - deleteList(newList); - return false; - } const int firstNumberValue = get(newList, position, &error); - if (error == 6) + if (error != NOT_ERROR) { freePosition(position); deleteList(newList); @@ -88,70 +60,48 @@ bool testRemoveHead() // Function to check the function that deletes the last item in the list bool testRemoveTail() { - int error = 0; + Error error = NOT_ERROR; List* newList = createList(); add(newList, 10, &error); add(newList, 20, &error); - if (error == 3) + if (error != NOT_ERROR) { deleteList(newList); return false; } Position* position = first(newList, &error); const int firstNumberValue = get(newList, position, &error); - if (error == 6) - { - freePosition(position); - deleteList(newList); - return false; - } removeElement(findPosition(20, newList, &error), newList); - if (error == 6 || error == 3) + if (error != NOT_ERROR) { deleteList(newList); return false; } - // At this point, error becomes equal to 6, since a non - existent element (it has been deleted) + // At this point, error becomes equal to ELEMENT_IS_MISSING, since a non - existent element (it has been deleted) const int secondNumberValue = get(newList, next(position), &error); freePosition(position); deleteList(newList); - return firstNumberValue == 10 && secondNumberValue == 0 && error == 6; + return firstNumberValue == 10 && secondNumberValue == 0 && error == ELEMENT_IS_MISSING; } // A function for checking a function that deletes any list item except the first one bool testRemoveElement() { - int error = 0; + Error error = NOT_ERROR; List* newList = createList(); add(newList, 10, &error); add(newList, 20, &error); add(newList, 30, &error); - if (error == 3) + if (error != NOT_ERROR) { deleteList(newList); return false; } removeElement(findPosition(20, newList, &error), newList); - if (error == 2) - { - deleteList(newList); - return false; - } - if (error == 3 || error == 1 || error == 6) - { - deleteList(newList); - return false; - } Position* position = first(newList, &error); const int firstNumberValue = get(newList, position, &error); - if (error == 5) - { - freePosition(position); - deleteList(newList); - return false; - } const int secondNumberValue = get(newList, next(position), &error); - if (error == 5) + if (error != NOT_ERROR) { freePosition(position); deleteList(newList); @@ -165,24 +115,19 @@ bool testRemoveElement() // Function to check the function that finds the positions of the list items bool testFindPosition() { - int error = 0; + Error error = NOT_ERROR; List* newList = createList(); add(newList, 10, &error); add(newList, 20, &error); add(newList, 30, &error); - if (error == 3) + if (error != NOT_ERROR) { deleteList(newList); return false; } Position* firstElementPosition = findPosition(10, newList, &error); - if (error == 3 ||error == 6) - { - deleteList(newList); - return false; - } int firstElementValue = get(newList, firstElementPosition, &error); - if (error == 6) + if (error != NOT_ERROR) { freePosition(firstElementPosition); deleteList(newList); @@ -191,13 +136,8 @@ bool testFindPosition() freePosition(firstElementPosition); Position* secondElementPosition = findPosition(20, newList, &error); - if (error == 3 || error == 6) - { - deleteList(newList); - return false; - } int secondElementValue = get(newList, secondElementPosition, &error); - if (error == 6) + if (error != NOT_ERROR) { freePosition(secondElementPosition); deleteList(newList); @@ -206,13 +146,8 @@ bool testFindPosition() freePosition(secondElementPosition); Position* thirdElementPosition = findPosition(30, newList, &error); - if (error == 3 || error == 6) - { - deleteList(newList); - return false; - } int thirdElementValue = get(newList, thirdElementPosition, &error); - if (error == 6) + if (error != NOT_ERROR) { freePosition(thirdElementPosition); deleteList(newList); @@ -227,5 +162,5 @@ bool testFindPosition() bool allTest() { - return testAdd() && testRemoveElement() && testRemoveHead() && testRemoveTail() && testFindPosition(); + return testAdd() && testRemoveElement() && testRemoveHead() && testRemoveTail(); } \ No newline at end of file From 5a2318fc9e3e34f6b8818fca032ad2fc4f965b43 Mon Sep 17 00:00:00 2001 From: MinyazevR Date: Wed, 17 Nov 2021 15:04:45 +0300 Subject: [PATCH 2/5] added a field for the size of the list --- List/List/List.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/List/List/List.c b/List/List/List.c index a37a4f9..b101833 100644 --- a/List/List/List.c +++ b/List/List/List.c @@ -8,6 +8,7 @@ typedef struct List { struct ListElement* head; + int size; } List; // A structure containing a pointer to the next and previous list item and a value variable for the list items @@ -47,6 +48,7 @@ void removeElement(Position* position, List* list) { return; } + list->size--; if (position->position == list->head) { list->head = list->head->next; @@ -190,9 +192,11 @@ void add(List* list, int value, Error* error) list->head = element; element->next = NULL; *error = NOT_ERROR; + list->size = 1; free(position); return; } + list->size++; if (*error == ELEMENT_IS_MISSING) { element->next = list->head; From c15eaab8d7322dc61049a252fd1f0605630bcaf4 Mon Sep 17 00:00:00 2001 From: MinyazevR Date: Wed, 17 Nov 2021 15:07:22 +0300 Subject: [PATCH 3/5] function to return the size of the list --- List/List/List.c | 5 +++++ List/List/List.h | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/List/List/List.c b/List/List/List.c index b101833..6c18f2b 100644 --- a/List/List/List.c +++ b/List/List/List.c @@ -231,6 +231,11 @@ void print(List* list) } } +int returnSize(List* list) +{ + return list->size; +} + void freePosition(Position* position) { free(position); diff --git a/List/List/List.h b/List/List/List.h index 4dda4fa..cc6a316 100644 --- a/List/List/List.h +++ b/List/List/List.h @@ -45,4 +45,7 @@ void print(List* list); Position* previous(Position* position); // Function for freeing up memory -void freePosition(Position* position); \ No newline at end of file +void freePosition(Position* position); + +// Function to return the size of the list +int returnSize(List* list); \ No newline at end of file From d38d2c3c40e832a246129b9539e56e0b9d134fe6 Mon Sep 17 00:00:00 2001 From: MinyazevR Date: Wed, 17 Nov 2021 15:13:30 +0300 Subject: [PATCH 4/5] add function for finding a pointer to the last element --- List/List/List.c | 22 +++++++++++++++++++++- List/List/List.h | 3 +++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/List/List/List.c b/List/List/List.c index 6c18f2b..312583c 100644 --- a/List/List/List.c +++ b/List/List/List.c @@ -85,6 +85,26 @@ Position* first(List* list, Error* error) return position; } +Position* last(List* list, Error* error) +{ + if (*error != NOT_ERROR) + { + return NULL; + } + Position* position = malloc(sizeof(Position)); + if (position == NULL) + { + *error = INSUFFICIENT_MEMORY; + return NULL; + } + position->position = list->head; + while (position->position->next != NULL) + { + position = next(position); + } + return position; +} + Position* next(Position* position) { position->position = position->position->next; @@ -97,7 +117,7 @@ Position* previous(Position* position) return position; } -bool last(Position* position) +bool isLast(Position* position) { return position->position->next == NULL; } diff --git a/List/List/List.h b/List/List/List.h index cc6a316..387dcfb 100644 --- a/List/List/List.h +++ b/List/List/List.h @@ -26,6 +26,9 @@ void add(List* list, int value, Error* error); // Function for finding a pointer to the first element Position* first(List* list, Error* error); +// Function for finding a pointer to the last element +Position* last(List* list, Error* error); + // Function to remove an item from the list void removeElement(Position* position, List* list); From a8d18aab318686a3d7ff191080dab89525c8429f Mon Sep 17 00:00:00 2001 From: MinyazevR Date: Tue, 23 Nov 2021 12:51:20 +0300 Subject: [PATCH 5/5] a function has been written to flip the list --- Test2/InvertedList/InvertedList.sln | 31 ++++ .../InvertedList/InvertedList/InvertedList.c | 41 +++++ .../InvertedList/InvertedList/InvertedList.h | 4 + .../InvertedList/InvertedList.txt | 1 + .../InvertedList/InvertedList.vcxproj | 155 ++++++++++++++++++ .../InvertedList/InvertedList.vcxproj.filters | 42 +++++ Test2/InvertedList/InvertedList/Main.c | 45 +++++ .../InvertedList/TestInvertedList.c | 42 +++++ .../InvertedList/TestInvertedList.h | 4 + 9 files changed, 365 insertions(+) create mode 100644 Test2/InvertedList/InvertedList.sln create mode 100644 Test2/InvertedList/InvertedList/InvertedList.c create mode 100644 Test2/InvertedList/InvertedList/InvertedList.h create mode 100644 Test2/InvertedList/InvertedList/InvertedList.txt create mode 100644 Test2/InvertedList/InvertedList/InvertedList.vcxproj create mode 100644 Test2/InvertedList/InvertedList/InvertedList.vcxproj.filters create mode 100644 Test2/InvertedList/InvertedList/Main.c create mode 100644 Test2/InvertedList/InvertedList/TestInvertedList.c create mode 100644 Test2/InvertedList/InvertedList/TestInvertedList.h diff --git a/Test2/InvertedList/InvertedList.sln b/Test2/InvertedList/InvertedList.sln new file mode 100644 index 0000000..0a42108 --- /dev/null +++ b/Test2/InvertedList/InvertedList.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31410.357 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InvertedList", "InvertedList\InvertedList.vcxproj", "{6D0D8D36-537D-4488-8912-DFBDCFA7365C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6D0D8D36-537D-4488-8912-DFBDCFA7365C}.Debug|x64.ActiveCfg = Debug|x64 + {6D0D8D36-537D-4488-8912-DFBDCFA7365C}.Debug|x64.Build.0 = Debug|x64 + {6D0D8D36-537D-4488-8912-DFBDCFA7365C}.Debug|x86.ActiveCfg = Debug|Win32 + {6D0D8D36-537D-4488-8912-DFBDCFA7365C}.Debug|x86.Build.0 = Debug|Win32 + {6D0D8D36-537D-4488-8912-DFBDCFA7365C}.Release|x64.ActiveCfg = Release|x64 + {6D0D8D36-537D-4488-8912-DFBDCFA7365C}.Release|x64.Build.0 = Release|x64 + {6D0D8D36-537D-4488-8912-DFBDCFA7365C}.Release|x86.ActiveCfg = Release|Win32 + {6D0D8D36-537D-4488-8912-DFBDCFA7365C}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4E0C4F28-408F-401C-B3D4-EAA69DDA329A} + EndGlobalSection +EndGlobal diff --git a/Test2/InvertedList/InvertedList/InvertedList.c b/Test2/InvertedList/InvertedList/InvertedList.c new file mode 100644 index 0000000..7188f3b --- /dev/null +++ b/Test2/InvertedList/InvertedList/InvertedList.c @@ -0,0 +1,41 @@ +#include "../../List/List/List.h" +#include +#include + +void flipNumbersArray(int numberOfElements, int* arrayOfNumbers) +{ + for (int i = 0; i < numberOfElements / 2; i++) + { + const int temporary = arrayOfNumbers[i]; + arrayOfNumbers[i] = arrayOfNumbers[numberOfElements - 1 - i]; + arrayOfNumbers[numberOfElements - 1 - i] = temporary; + } +} + +void invertList(List* list) +{ + List* newList = createList(); + Error error = NOT_ERROR; + Position* firstPosition = first(list, &error); + int* arrayOfElements = calloc(returnSize(list) + 1, sizeof(int)); + if (arrayOfElements == NULL) + { + return; + } + for (int i = 0; i < returnSize(list); i++) + { + arrayOfElements[i] = get(list, firstPosition, &error); + next(firstPosition); + } + flipNumbersArray(returnSize(list), arrayOfElements); + Position* secondPosition = first(list, &error); + for (int i = 0; i < returnSize(list); i++) + { + const int value = arrayOfElements[i]; + replaceValue(secondPosition, value); + next(secondPosition); + } + free(arrayOfElements); + free(firstPosition); + free(secondPosition); +} \ No newline at end of file diff --git a/Test2/InvertedList/InvertedList/InvertedList.h b/Test2/InvertedList/InvertedList/InvertedList.h new file mode 100644 index 0000000..11173ac --- /dev/null +++ b/Test2/InvertedList/InvertedList/InvertedList.h @@ -0,0 +1,4 @@ +#pragma once +#include "../../List/List/List.h" + +List* invertList(List* list); \ No newline at end of file diff --git a/Test2/InvertedList/InvertedList/InvertedList.txt b/Test2/InvertedList/InvertedList/InvertedList.txt new file mode 100644 index 0000000..d9440a5 --- /dev/null +++ b/Test2/InvertedList/InvertedList/InvertedList.txt @@ -0,0 +1 @@ +20 30 40 10 \ No newline at end of file diff --git a/Test2/InvertedList/InvertedList/InvertedList.vcxproj b/Test2/InvertedList/InvertedList/InvertedList.vcxproj new file mode 100644 index 0000000..98fe288 --- /dev/null +++ b/Test2/InvertedList/InvertedList/InvertedList.vcxproj @@ -0,0 +1,155 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + + + + + + + + + + + 16.0 + Win32Proj + {6d0d8d36-537d-4488-8912-dfbdcfa7365c} + InvertedList + 10.0 + + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + Application + true + v142 + Unicode + + + Application + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;_CRT_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + Level3 + true + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + + + + + Level3 + true + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + + + Console + true + true + true + + + + + + \ No newline at end of file diff --git a/Test2/InvertedList/InvertedList/InvertedList.vcxproj.filters b/Test2/InvertedList/InvertedList/InvertedList.vcxproj.filters new file mode 100644 index 0000000..f71c879 --- /dev/null +++ b/Test2/InvertedList/InvertedList/InvertedList.vcxproj.filters @@ -0,0 +1,42 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + Исходные файлы + + + + + Файлы заголовков + + + Файлы заголовков + + + Файлы заголовков + + + \ No newline at end of file diff --git a/Test2/InvertedList/InvertedList/Main.c b/Test2/InvertedList/InvertedList/Main.c new file mode 100644 index 0000000..7a3f96d --- /dev/null +++ b/Test2/InvertedList/InvertedList/Main.c @@ -0,0 +1,45 @@ +#include +#include "../../List/List/List.h" +#include "InvertedList.h" +#include "TestInvertedList.h" + +int readFile(const char* filename, List* list) +{ + FILE* file = fopen(filename, "r"); + if (file == NULL) + { + return -2; + } + Error error = NOT_ERROR; + while (!feof(file)) + { + int temporary = 0; + const int readBytes = fscanf(file, "%d", &temporary); + if (readBytes < 0) + { + break; + } + add(list, temporary, &error); + } + fclose(file); + return 0; +} + +int main() +{ + if (!testInvertedList()) + { + return -1; + } + List* newList = createList(); + deleteList(newList); + const int readFileResult = readFile("InvertedList.txt", newList); + if (readFileResult == -2) + { + deleteList(newList); + printf("File not found"); + return -1; + } + invertList(newList); + deleteList(newList); +} \ No newline at end of file diff --git a/Test2/InvertedList/InvertedList/TestInvertedList.c b/Test2/InvertedList/InvertedList/TestInvertedList.c new file mode 100644 index 0000000..04f06eb --- /dev/null +++ b/Test2/InvertedList/InvertedList/TestInvertedList.c @@ -0,0 +1,42 @@ +#include "TestInvertedList.h" +#include "InvertedList.h" +#include +#include + +bool testInvertedList() +{ + FILE* file = fopen("InvertedList.txt", "r"); + if (file == NULL) + { + return -2; + } + Error error = NOT_ERROR; + List* list = createList(); + while (!feof(file)) + { + int temporary = 0; + const int readBytes = fscanf(file, "%d", &temporary); + if (readBytes < 0) + { + break; + } + add(list, temporary, &error); + } + fclose(file); + invertList(list); + const int array[5] = {10, 40 , 30 , 20}; + Position* secondPosition = first(list, &error); + for (int i = 0; i < returnSize(list); i++) + { + if (array[i] != get(list, secondPosition, &error)) + { + freePosition(secondPosition); + free(list); + return false; + } + next(secondPosition); + } + freePosition(secondPosition); + free(list); + return true; +} \ No newline at end of file diff --git a/Test2/InvertedList/InvertedList/TestInvertedList.h b/Test2/InvertedList/InvertedList/TestInvertedList.h new file mode 100644 index 0000000..62d3643 --- /dev/null +++ b/Test2/InvertedList/InvertedList/TestInvertedList.h @@ -0,0 +1,4 @@ +#pragma once +#include + +bool testInvertedList(); \ No newline at end of file