/42cursus-ft_printf

The ft_printf is an exercise of the 42 school. The description is simple: one has to recode printf from the libc library.

Primary LanguageC

Welcome to 42cursus-ft_printf!

This project is an exercise of the 42 school. The task is to recode the basics of the libc printf function. As a bonus, one can recode some flags as well as the width and the precision. The projects subject is to teach how variadic functions work in C, but also to teach how to organize bigger projects.

Purpose of this repository

This repository shows my solutions of this exercise, although I have not done the bonus part.

Approach

I used the ModelViewController principle for this project. The printing part represents the View, the formatting part follows the model part of the principle. I have not done the bonus part, it could be added quite easy though. Apart from the MVC principle, I used an object-orientied style.

Usage

If you wish to use this library, simply include the ft_printf.h header and use its Makefile.

As all other C projects at the 42 school, the code has to written in accordance with the norm:

  • Only 25 lines per function,
  • only 5 functions per file,
  • usage of only the allowed external functions.

© 2021 mhahnFr