Generic and useful data structures targetting C11. Licensed under GPLv3, see LICENSE
.
- dynamic hashtable (hashmap_t / HashMap)*
- dynamic array (arraylist_t / ArrayList)
- doubly linked list (linkedlist_t / LinkedList)
- heap queue (heapq_t)
- stack (stack_t)**
- circular queue
* hashmap implementation mirrors https://github.com/DHPS-Solutions/dhps-lib/blob/main/hashmap.c
** stack implementation is based on https://github.com/DHPS-Solutions/dhps-lib/blob/main/stack.c
The easiest is to head over to the stb
branch, clone or copy the nicc.h
file, and include the single translation unit into your C project:
#define NICC_IMPLEMENTATION
#include "nicc.h"
This gives you access to all datatypes provided by the project. If you only want a certain datatype, for example hashtable, you could do:
#define NICC_HASHMAP_IMPLEMENTATION
#include "nicc.h"
See examples/
for examples on how to use the interface provided.
Checkout the slash project if you want to see nicc used in a more real world scenario.