This is a fundamental project that challenges students to create their own C library, containing re-implemented functions from the standard C library as well as additional utility functions.
- Standard C Library Functions: Re-implements essential functions such as
strlen
,strcpy
,isdigit
, etc. - Memory Management Functions: Includes memory allocation functions like
malloc
,free
, and string manipulation functions likestrdup
. - Linked List Functions: Implements a variety of linked list functions for efficient data manipulation.
- Additional Utility Functions: Provides additional utility functions to assist in everyday C programming tasks.
-
Clone the repository:
git clone https://github.com/marzianegro/42-libft.git
-
Navigate to the project directory:
cd 42-libft
-
Compile the library:
make
-
Include the
libft.h
header file in your C project:#include "libft.h"
-
Link your project with the compiled
libft.a
library during compilation:gcc -o your_program your_program.c -L. -lft
#include "libft.h"
int main()
{
char *str = "Hello, libft!";
ft_putstr(str);
return (0);
}