ft_printf is a 42 Madrid Common Core project in which you have to recode the libc library printf function.
ft_printf is a variadic function that will allow you to format any input and send it through the terminal standard output stdout. It means that this function must take a dynamic number of variables and get their values.
- Function protoype:
int ft_printf(char const *, ...); - It's not necessary to implement the original
printfbuffer management. - Your function will be compared to the original
printf. - To create your library you must use the
arcommand.libtoolis forbidden. - Your
libftprintf.afile must be created in the root folder of the project.
%cfor characters.%sfor strings.%pforvoid *pointers.%dfor base 10 decimal numbers.%ifor base 10 integers numbers.%ufor base 10 unsigned decimal numbers.%xfor base 16 lowercase hexadecimal numbers.%Xfor base 16 uppercase hexadecimal numbers.%%for the % character.
- C compiler:
gcc,cc, etc... makeutility.libftlibrary in the project root folder.
make: compile project.make clean: deletes compilation files except the executables.make fclean: deletes all compilation files.make re: executesmake fcleanandmake.
-
Clone the repository:
git clone https://github.com/RaulSoftDev/ft_printf.git
-
Build the project:
make
-
Use the library in your project:
#include "ft_printf/libftprintf.h"
-
Compile your project:
gcc -Wall -Wextra -Werror *.c ft_printf/libftprintf.a