In this project we have to replicate the famous printf
function of the stdio
lib.
-
include
- It's the.h
file of theft_printf
project; -
libft
- It's my static lib functions. Read more about it; -
obj
- The folder for object files; -
src
- The sorce code of this project.
This project was made without bonus, so you can use with the flags:
Place holder | Value |
---|---|
%c | a single character |
%s | a string (end up '\0' ) |
%p | the address of a variable |
%d or %i | a integer |
%u | unsigned integer |
%x | a number in hexadecimal (base 16) lowercase format |
%X | a number in hexadecimal (base 16) uppercase format |
%% | a percent sign |
1 - Clone this repository into your directory project
2 - In the ft_printf/
directory compile the ft_printf
with make
3 - compile your project with the flags:
-L ./ft_printf/ -lftprintf -I ./ft_printf/include
#include "ft_printf.h"
int main(void)
{
char str[6] = "World";
ft_printf("Hello, %s!\n", str);
return (0);
}