This repo contains a C, C++, and a broken Rust version of a doubly-linked list which I wrote for fun. I am cuurrently writing a vector in C (a growable array not the physics vector), which I will port to C++ and Rust once it is finished. The master
branch contains the C versions, cpp
contains the C++ versions, and the rust
branch contains any Rust codee. I'm doing these projects to learn C and C++ so they might not contain great code, so suggestions are welcome.
The C/C++ projects are built with CMake and GCC, since as far as I know Clang support for c2x
is not as good as GCC's. Each data structure has its own library, which is statically linked into the listfun
executable which I use for testing. Thus you can build with normal CMake commands, e.g.
mkdir debug
cd debug
cmake ../ -D CMAKE_BUILD_TYPE=Debug -G=Ninja
The Rust version is built with cargo, so a simple cargo run
will suffice.