Hive Helsinki (School 42) second curriculum project (Rank01)
The repository contains a custom made printf function derived from the C standard library. The buffer management of the original function is not taken into consideration within this implementation. The following conversions are covered: [c, s, p, d, i, u, x, X, %]. Being the second project in the 42 school's curriculum, it intends to familiarize oneself with the concept of variadic functions in C. The resulting function is used in the course of future school projects written in C language.
The function is able to print with the following conversions:
- c (characters)
- s (strings)
- p (addresses)
- d/i (integers)
- u (unsigned integers)
- x (hexadecimal lower case)
- X (hexadecimal upper case)
- % (prints '%')
-gcc
compiler
with <stdlib.h>
and <stdarg.h>
To compile the printf library, go to its path and run:
$ make
To delete all files generated with make, go to the path and run:
$ make fclean
To use the function, include the header path e.g in your main.c file (given printf is in the main's folder):
#include "ft_printf.h"
compile printf as stated above, then compile the actual program:
gcc main.c libft/libft.a libftprintf.a