Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mli42/at42ft_containers
Reimplement some containers from the STL (vector, list, map, stack, queue && their iterators, const_iterators, reverse_iterators) [C++]
https://github.com/mli42/at42ft_containers
cpp98 list map queue stack stl-containers vector
Last synced: 27 days ago
JSON representation
Reimplement some containers from the STL (vector, list, map, stack, queue && their iterators, const_iterators, reverse_iterators) [C++]
- Host: GitHub
- URL: https://github.com/mli42/at42ft_containers
- Owner: mli42
- Created: 2020-10-06T11:35:44.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-23T21:16:17.000Z (over 3 years ago)
- Last Synced: 2024-09-28T23:40:56.113Z (about 1 month ago)
- Topics: cpp98, list, map, queue, stack, stl-containers, vector
- Language: C++
- Homepage: https://github.com/mli42/containers_test
- Size: 118 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# at42ft_containers
Reimplement some containers of the STL (vector, list, map, stack, queue && their iterators, const_iterators, reverse_iterators) [C++98]What is a [container](https://www.cplusplus.com/reference/stl/) ?
```
A container is a holder object that stores a collection of other objects (its elements).
They are implemented as class templates, which allows a great flexibility in the types supported as elements.The container manages the storage space for its elements and provides member functions to access them,
either directly or through iterators (reference objects with similar properties to pointers).
```[Abstraction in C++](https://www.geeksforgeeks.org/abstraction-in-c/):
```
Data abstraction is one of the most essential and important feature of object oriented programming in C++.
Abstraction means displaying only essential information and hiding the details.
Data abstraction refers to providing only essential information about the data to the outside world,
hiding the background details or implementation.
```So, what are these containers abstracting?
```
- vector: Dynamic contiguous array
- list: Circular double linked list
- map: Binary Search Tree of key-value pairs, sorted by unique keys.
- stack: Adapts a container to provide stack (LIFO - Last In First Out)
- queue: Adapts a container to provide queue (FIFO - First In First Out)
```Btw, I made my own tester 🥳 : https://github.com/mli42/containers_test
## Tips for this project
My recommended order: `vector > list > map > stack/queue`
You should make a spreadsheet with a color-code with every method you have to do in every containers, gathering methods:
- to do (white),
- implemented (light green),
- tested (darker green),
- does not exist (dark grey)
Don't be afraid to spend time on iterators