- The goal of this project is pretty straightfoward. You will recode printf(). You will mainly learn about using a variable number of arguments.
- You will discover variadic functions in C.
$ make
$ [CC] [CFLAGS] [your_main.c] libftprintf.a -o main.out
- Compile library file (libftprintf.a) with your c files.
- You need to include 'ft_printf.h' header into your c or header files.
Prototype
int ft_printf(const char *str, ...);
Example
#include "ft_printf.h"
int main(void) {
char *my_name = "younhwan";
ft_printf("Hello World!\nI'm %s.\n", my_name);
return (0);
}
>> ./main.out
Hello World!
I'm younhwan.
>>