I'm just starting with C and I want to make a program that displays the alphabet in lowercase, on a single line, by
ascending order, starting from the letter ’a’. And it should be protyped this way
void ft_print_alphabet(void);
I'm trying this code but it's not working.
void ft_putchar(char c);
void ft_print_alphabet(void)
{
char letter;
letter = 'a';
while (letter <= 'z')
{
ft_putchar(letter);
letter++;
}
}
int main(void)
{
ft_print_alphabet();
return 0;
}
I compile it using gcc ( Since it's what we must use ) like the following: gcc -o ftpp ftpp.c But I keep getting this error
Undefined symbols for architecture x86_64:
"_ft_putchar", referenced from:
_ft_print_alphabet in ft_print_alphabet-3d7c19.o
ld: symbol(s) not found for architecture x86_64