Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 2
I guess you can use it as is then. It's a custom function for printing output. Just copy the function definition where you want to use `ft_putchar`or `ft_putnbr`. Or even better, you can save the function definition in a header file, and include the header as necessary.
BTW, I see a stranded character '0' in the end of `ft_putnbr` block, it may cause problem, so just delete that.
+ 1
Where did you find this `ft_putchar` ?
0
Well, if you look a little closer, the functions are named with the type of stuff they were meant to print.
ft_putchar - prints a character.
ft_putnbr - prints a number (integer to be precise).
ft_putstr - prints a string (char array).
ft_strdup - meant to duplicate a string (char array).
- 1
Perhaps you meant putchar? ft_putchar isn't part of the standard I/O IIRC.
(Edit)
Can you share the code please?
- 1
Just as you would normally, create a main function, and use either one of the `ft_*` functions for testing out. I thought you already have used them?