Skip to content

Latest commit

 

History

History
99 lines (68 loc) · 2.54 KB

README.md

File metadata and controls

99 lines (68 loc) · 2.54 KB

42cursus ft_printf()

ftprintf

Development repo for 42cursus ft_printf project



This is a project in daily use. If you want to see the project that i have been evaluated in 42school click in releases at the right side!

🗣️ About

_The aim of this project is to code a printf() function that will behave as close as possible from the original printf() from <stdio.h>


🧐 Great Resources for ft_printf()

42-Gitbook

C++ printf() reference

Oracle Docs

For detailed information, refer to the subject of the project

🚀 This project consists of recode the usetul printf() from <stdio.h> 
  • Supported conversions %: c, s, p, i, d, u, x, X
  • Supported flags: # + (space)
  • Supported options: - 0 . width

🛠️ Usage

Requirements

The function is written in C language and thus needs the gcc compiler and some standard C libraries to run.

Instructions

make to compile.

Basic Usage

For example, let's create a main.c file.

// Include the header
#include "ft_printf.h"

int main(void)
{
      // Call the function
      ft_printf("Testing ft_printf!");
      return (0);
}

Compile the main.c file with the ft_printf library and run the program:

cc main.c libftprintf.a && ./a.out

Output should be:

Testing ft_printf!

Testing

WHY NOT ASSEMBLY?

++++++++++[>+>+++>+++++++>++++++++++<<<<-]>>>.>---.++++++++++++.++.+++ +++.--.<<++.>>------.------------.+++++++++++++.<<.>>++++++.------------ .-------. +++++++++++++++++++.<<.>>----------------.+++++.+++++++++.--- ----------.--.+ ++++++++++++++++.--------.+++++++++++++.<<.>>---------- -------------.+++.+++ ++++.---.----.+++++++++++++++++.--------------- --.-.<<.>>+++++.+++++.<<.>-------...