ft_containers is a project that aims to recreate C++ Standard Template Library (STL) containers: vector, stack, map, and set. This project is designed to help developers understand the inner workings of these fundamental data structures and is not meant to replace the STL but to be a teaching and learning tool.
To install ft_containers, clone the repository to your local machine:
git clone git@github.com:Sylsee/ft_containers.git
cd ft_containersCompile the project using the make command:
makeAfter compiling, you can use the containers in your C++ code:
#include "ft_containers/vector.hpp"
int main() {
ft::vector<int> vec;
vec.push_back(10);
// ...
}-
ft::vector: Similar tostd::vector. It is a dynamic array that grows as needed. -
ft::stack: Similar tostd::stack. It is a container adapter that gives the programmer the functionality of a stack - specifically, a FILO (first-in, last-out) data structure. -
ft::map: Similar tostd::map. It is an associative container that stores elements formed by a combination of a key value and a mapped value. -
ft::set: Similar tostd::set. It is an associative container that contains a sorted set of unique objects.
ft_containers is licensed under the MIT license.