The goal of this project is to write a simplified personal implementation in C of the output utility function printf() from the standard C library.
It allowed me to explore the concept of variable arguments list and to discover how this so often-used function works.
The result is a library that can be used in other C projects (I don't know why someone would prefer this implementation instead of the original one though...).
Project Name | ft_printf |
---|---|
Description | Custom version of the libc printf function |
Technologies | |
External libraries | malloc(), free(), write(), va_start(), va_arg(), va_copy(), va_end() |
git clone https://github.com/GSantoine/ft_printf.git
cd ft_printf
make
Since this a library, you can link it inside the Makefile of your project like so :
$(CC) $(CFLAGS) -Lft_printf -lftprintf -c $< -o $@
int main(int ac, char **av)
{
ft_printf("this is :%d\n", 42);
return 0;
}