undefined reference to `startswith' : I am writing some C in which the program is going to convert the first command line argument into a int and check to see if it is an int. If it isnt a integer value it will then attempt to check to see whether the string begins with a '.' character or not. For some reason I am getting an undefined reference. How is this an undefined reference when it seems to be defined?

Here is the following code:

    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    #include <ctype.h>
    #include <string.h>
    int startswith(char,char);
    
    int main(int argc, char *argv[])
    {
            int forst;
            srand(time(NULL));
            int speed_delay = rand()%20;
            printf("The speed delay is:%i\n",speed_delay);
            int first = atoi(argv[1]);
            printf("First:%i\n",first );
    
            if(first == 0)
            {
                    //this means text was inserted instead of a number
                    if(startswith(first,'.'))
                    {
                            printf("string starts with a period !");
    
                    }
            }
            else
            {
    
            }
    
    int startswith( const char *one, const char *two)
    {
            if(strncmp(one,two,strlen(two)) == 0)
            {
                    return 1;
            }
            return 0;
    
    }
    
    
    
    }

