Add CMakeLists for all datastructs
+ Reorder, refactor comments
This commit is contained in:
18
cpp/datastructs/doublelist/CMakeLists.txt
Normal file
18
cpp/datastructs/doublelist/CMakeLists.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
###############################################################################
|
||||
## Author: Shaun Reed ##
|
||||
## Legal: All Content (c) 2020 Shaun Reed, all rights reserved ##
|
||||
## About: An example of a doubly linked list implementation ##
|
||||
## ##
|
||||
## Contact: shaunrd0@gmail.com | URL: www.shaunreed.com | GitHub: shaunrd0 ##
|
||||
##############################################################################
|
||||
## CMakeLists.txt
|
||||
#
|
||||
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.2)
|
||||
|
||||
# Define the project name
|
||||
project(DoubleList)
|
||||
# Define source files
|
||||
set(SRC driver.cpp doublelist.cpp)
|
||||
# Build an executable
|
||||
add_executable(DoubleListDriver ${SRC})
|
||||
@@ -81,7 +81,7 @@ bool DoubleList::insert(int val)
|
||||
|
||||
/** insert at
|
||||
* @brief Inserts a value in the place of a given key
|
||||
* Key Node found is moved to the newNode->next positon
|
||||
* Key Node found is moved to the newNode->next position
|
||||
*
|
||||
* @param key The value to search for to determine insert location
|
||||
* @param val The value to be inserted into the list
|
||||
|
||||
@@ -26,7 +26,7 @@ int main()
|
||||
|
||||
while (!exit)
|
||||
{
|
||||
std::cout << "##### Singly Linked List Menu #####\n\t0. Exit"
|
||||
std::cout << "##### Doubly Linked List Menu #####\n\t0. Exit"
|
||||
<< "\n\t1. Insert\n\t2. Insert at\n\t3. Empty list\n\t4. Peek top of list"
|
||||
<< "\n\t5. Print list\n\t6. Find\n\t7. Remove\n\t8. Replace\n";
|
||||
std::cin >> choice;
|
||||
|
||||
Reference in New Issue
Block a user