A simple recode of libc's printf
- ft_printf does not use buffer management like the real printf function
- It manages the following conversions:
%c
,%s
,%p
,%d
,%i
,%u
,%x
,%X
and%%
- Like the real printf function, ft_printf returns the number of characters it printed
int ft_printf(const char *format, ...);
git clone https://github.com/Archer-01/ft_printf.git
cd ft_printf
touch main.c
#include "ft_printf.h"
int main(void)
{
ft_printf("%s is cool! %d/100\n", "ft_printf", 100);
return (0);
}
make
gcc main.c -L. -lftprintf
./a.out