From 9b05ec4ca975ae74a1611379a5a46892612f61d8 Mon Sep 17 00:00:00 2001 From: Rohith-Raju Date: Sun, 12 May 2024 19:02:39 +0530 Subject: [PATCH] update(main): add example and fill readme --- main.cpp | 9 +++++++++ readme.md | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 readme.md diff --git a/main.cpp b/main.cpp index 15c21fb..5cd5c90 100644 --- a/main.cpp +++ b/main.cpp @@ -1,6 +1,15 @@ // // Created by Rohith on 1/10/24. // +#include "LinkedList.h" +#include "iostream" int main() { + LinkedList LList = {1, 2, 3, 4, 5}; + + for (auto item : LList) { + std::cout << item; + } + + return 0; } diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e43c88b --- /dev/null +++ b/readme.md @@ -0,0 +1,40 @@ +# LinkedList +This project consits of templated version of linear linked list that mimics the style used in C++ standard template library. +This project was done to learn, understand and practice concepts specifically tied to C++. + +## Prequisite +This project uses C++17 and cmake version 3.27. + +## Usage +```c++ +#include "LinkedList.h" +#include "iostream" + +int main() { + LinkedList LList = {1, 2, 3, 4, 5}; + + for (auto item : LList) { + std::cout << item; + } + + return 0; +} +``` + +## Testing +`Gtest` is used as the testing framework. To build tests + +``` +mkdir build && cd build +cmake ../ +cd testing +make +``` + +To run the tests + +``` +./LinkedList_test +``` + +