/42_Ft_printf_1337

This project is pretty straight forward. We will recode printf. Hopefully we will be able to reuse it in future projects without the fear of being flagged as a cheater. We will mainly learn how to use variadic arguments.

Primary LanguageC

42_FT_PRINTF_1337

42 Badge

ft_printf

The ft_printf project is the second project in the 42 network curriculum. It is a custom implementation of the printf function in C, offering a versatile and efficient solution for formatting output.

Features

  • Supports a wide range of format specifiers and modifiers.
  • Precision, width, and length modifiers for precise formatting control.
  • Basic color formatting for improved output readability.
  • Modular and extensible design for easy integration into various C projects.

Getting Started

Installation

  1. Clone the Repository

    git clone https://github.com/haytham-hammioui/42_Ft_printf_1337.git ft_printf
  2. Compile the Library Navigate to the ft_printf directory and run make. This will compile the library and produce a libftprintf.a file.

    cd ft_printf
    make

Usage

To use ft_printf in your C projects:

  1. Include the ft_printf header file in your C source files.

    #include "ft_printf.h"
  2. Compile your project along with libftprintf.a. For example:

    gcc -o your_program your_source_files libftprintf.a

Contributing

Contributions to ft_printf are welcome! Whether you've found a bug, have a feature request, or want to contribute code:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Add your contributions.
  4. Push your branch and open a pull request against the ft_printf repository.