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
- Host: GitHub
- URL: https://github.com/ruk33/data_structures
- Owner: Ruk33
- License: mit
- Created: 2020-11-30T22:21:17.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-31T19:43:32.000Z (over 4 years ago)
- Last Synced: 2025-07-28T20:02:11.183Z (2 months ago)
- Language: C
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
Data structures
---------------The following data structures are provided by this library:
- Hash map
- List
- Stack
- QueueCheck the header files for usage examples.
Requirements
------------- GCC
- MakeInstallation
------------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
#includeint main()
{
struct List *list = list_create(malloc, free);
int foo = 42;list_add_last(&list, &foo);
return 0;
}