Photo by Laura Chouette on Unsplash
format spec construction:
%[flags][width][.precision][length]type
Conversions: [cspdiuxX%]
Flags: [-0.*]
and minimum field width with all conversions
Also prints 0
or '\0'
with %c
conversion. To check this you can use | cat -e
on output (as in makefile main
rule).
Details about displaying printed 0
on stackoverflow
git clone https://github.com/kukinpower/ft_printf.git
cd ft_printf
git submodule update --init
to clone libft
make
to compile library
Makefile works with rules: re
clean
fclean
main
main clean
Rule main
compiles with main and runs a.out
Compiles with flags: -Wall -Wextra -Werror
ft_printf()
uses libft
library functions. And compiles with it.
#include "libftprintf.h"
Then use as standard printf()
with a format string.