Bonjour j'essaye de recupérer un tableau d'un fonction mais cela ne fonctionne pas.
Le compilateur me donne l'erreur:
172 incompatible types in assignment

Voici 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
 
char edit[30][116] = { {0} };
 
char tab2[116] = {0};
char tab3[116] = {0};
.
.
.
 
 for(i=0;i<=nbrlignes;i++)
               {
                 strcpy(tab2, edit[i]);                     
                 tab3 = centrage(tab2);
                 strcpy(edit[i], tab3);
                  }
la fonction :
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
char centrage(char tab[116])
{
int taille_u, largeur,i, j ,espace_depart;
char new_tab[116];
 
largeur=114;   
 
 
taille_u = strlen(tab);
 
espace_depart = (largeur - taille_u)/2;
 
for(i=0;i<=espace_depart;i++)
{
 new_tab[i] =' ';
}
new_tab[espace_depart+1] = '\0';
 
strcat(new_tab, tab);     
 
return new_tab;     
}

Merci beaucoup