-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update(main): add example and fill readme
- Loading branch information
1 parent
9eb021a
commit 9b05ec4
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
// | ||
// Created by Rohith on 1/10/24. | ||
// | ||
#include "LinkedList.h" | ||
#include "iostream" | ||
|
||
int main() { | ||
LinkedList<int> LList = {1, 2, 3, 4, 5}; | ||
|
||
for (auto item : LList) { | ||
std::cout << item; | ||
} | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<int> 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 | ||
``` | ||
|
||
|