bonjour,
lors de la compilation j'ai un problème, je vous donne mon code :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
int main(int ac, char **av)
{
   char *str;
   str = test_name[av(2)];
}
 
char *test_name(char *s)
{
   int   c;
   int   test;
   char  *str;
 
   test = 0;
   c = 0;
   while (s[c] != '\0')
    {
      if (s[c] = '/')
        test = 1;
      c++;
    }
  if (test = 1)
    {
      c = strlen(s);
      while (s[c] != '/')
        c--;
      while (s[c] != '\0')
        str[test] = s[c];
      c++;
      return (str);                           
} 
else
    return (s);               
}
et quand je compile j'ai un message d'erreur "
- error : conflicting types for 'test_name'
- error : previous implicit declaration of 'test_name' was here

je ne voit pas de quoi ca vient. merci