An open API service indexing awesome lists of open source software.

https://github.com/ruk33/data_structures

Data structures in C
https://github.com/ruk33/data_structures

Last synced: 29 days ago
JSON representation

Data structures in C

Awesome Lists containing this project

README

          

Data structures
---------------

The following data structures are provided by this library:

- Hash map
- List
- Stack
- Queue

Check the header files for usage examples.

Requirements
------------

- GCC
- Make

Installation
------------

Generate the .a file by running make. This command will generate
the file named libdatastructures.a. You can move this file to
/usr/lib or pass the flag -L/path/to/data_structures when compiling
your program.

For headers, copy the entire folder into /usr/include.

Installation example
--------------------

cd /path/to/data_structures
make
cp libdatastructures.a /usr/lib
cp -r ../data_structures /usr/include
gcc program.c -ldatastructures

// program.c
#include
#include

int main()
{
struct List *list = list_create(malloc, free);
int foo = 42;

list_add_last(&list, &foo);

return 0;
}