Skip to content

A project about recoding printf. learning what is and how to implement variadic functions.

Notifications You must be signed in to change notification settings

amine-za/ft_printf-1337

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ft_printf Project - 42 Network

Description

This project, part of the 42 network's curriculum, aims to recreate the standard C library function printf. The ft_printf function will be able to handle various format specifiers, modifiers, and flags, just like the original printf function.

Features

  • Supports basic format specifiers (e.g., %c, %s, %d, %x, %f).
  • Handles width and precision modifiers.
  • Supports length modifiers (e.g., hh, h, l, ll).
  • Implements some flags (e.g., 0, -, +, #, ).
  • Handles conversion of floating-point numbers with a specified precision.

How to Use

  1. Clone the repository:

    git clone https://github.com/aminezagh/ft_printf.git
  2. Navigate to the project directory:

    cd ft_printf
  3. Compile the project:

    make
  4. Include the ft_printf.h header in your project and use the ft_printf function:

    #include "ft_printf.h"
    
    int main() {
        ft_printf("Hello, %s!\n", "world");
        return 0;
    }
  5. Compile your project with the libftprintf.a library:

    gcc -o my_program my_program.c libftprintf.a
  6. Run your program:

    ./my_program

Project Structure

  • srcs/: Contains the source code files.
  • includes/: Contains the header files.
  • libftprintf.a: The compiled library.
  • Makefile: Makefile for compiling the project.

Additional Notes

  • This project was developed as part of the 42 network curriculum.
  • Contributions and bug reports are welcome! Feel free to open an issue or submit a pull request.

About

A project about recoding printf. learning what is and how to implement variadic functions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published