question in C :pointer:|warning: passing argument 1 of 'strcpy' makes pointer from integer without a cast [-Wint-conversion]|

Viewed 55
void remplacer(char *s, char *w1, char *w2)
{
    int i;
    char aux;

    while (i < strlen(s) - strlen(w1) + 1)
    {
        if (!(strncmp(s + i, w1, strlen(w1))))
        {
            strcpy(aux, s + i + strlen(w1));
            strcpy(s + i, w2);
            strcat(s, aux);
            i++;
        }
    }
}

Hi, I find a problem with this code I'm a beginner in C help me please this the error :warning: passing argument 1 of 'strcpy' makes pointer from integer without a cast [-Wint-conversion]|

0 Answers
Related