Because putnbr and putstr aren’t enough
Explore the docs »
Table of Contents
This project is pretty straight forward. You will recode printf. Hopefully you will be able to reuse it in future project without the fear of being flagged as a cheater. You will mainly learn how to use variadic arguments.
Program name | libftprintf.a |
---|---|
Turn in files | *.c, /.c, *.h, /.h, Makefile |
Makefile | all, clean, fclean, re, bonus |
External functs. | malloc, free, write, va_start, va_arg, va_copy, va_end |
Libft authorized | yes |
Description | Write a library that contains ft_printf, a function that will mimic the real printf |
- The prototype of ft_printf should be int ft_printf(const char *, ...);
- It will manage the following conversions: cspdiuxX%
- It will manage any combination of the following flags: '-0.*' and minimum field width with all conversions
- Manage one or more of the following conversions: nfge
- Manage one or more of the following flags: l ll h hh
- Manage all the following flags: '# +' (yes, one of them is a space)
- Clone the repo
git clone https://github.com/pabloocg/ft_printf.git
- Enter the repository and run make
cd ft_printf && make
Now you can use the ft_printf function of the library in your projects!
The only thing you have to do is to compile your project with the library.
gcc your_program.c -L (library_path) -lftprintf
Don't forget to include the ft_printf.h file in your project
#include "library_path/ft_printf.h"
Distributed under the Apache License 2.0. See LICENSE.txt
for more information.
Pablo Cuadrado García
Linkedin - [email protected]