bonjour a tous,

voila mon probleme aujourd'hui est en fait d'echanger certains caracteres dans un tableau de caracteres a certaines positions stocke dans un tableau d'entier , sauf erreur elle echange uniquement le tab[0] alors que les echanges sont verifies.
voici le 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
 
int   *pos;
  int   *pos1;
  int   i;
  int   j;
 
  i = 0;
  j = 0;
  write(1, tab, size);
  my_putchar('\n');
  pos = search_point(size ,tab);
  pos1 = calcul(pos); // tab entier du style tab[0] = 0 tab[1]= 7 ......
  while (j < 12)
    {
      pos1[j] = i;
      my_putstr("ok");
      tab[i] = 'x';
      my_putchar(tab[i]);
      j++;
    }
  my_putchar('\n');
  my_putstr(tab);