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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include <stdio.h>
#include <string.h>
FILE *fp, *fp2[200] ;
char (*path)[]= "*"  ;
char (*path2)[200][100], car_actuel, tab[200][1000], a, ha[208], ha2[208], z, b=97 ;
int comp, com2, i, com, car, x, y, d=0 , w;
unsigned hehe[200][100] ;
int main(void)
{
	if((fp=fopen(path, "r")) == NULL)
		printf("Erreur2\n") ;
	for(comp= 0; comp != 200; comp++)
	{
		for(com2= 0; com2 != 1000; com2++)
		{
			car_actuel= fgetc(fp) ;
			tab[comp][com2]= car_actuel ;
		}
	}
	close(fp) ;
	for(i= 0; i != 4; i++)
	{
		for(a= 97; a !=122; a++)
		{
			ha2[d]= b ; 
			ha[d]= a ;
			d++ ;
		}
		b++ ;
		for( ; a != 97; a--)
		{
			ha2[d]= b ;
			ha[d]= a ;
			d++ ;
		}
	}
	for(com= 0; com != 200; com++)
	{
		hehe[com][0]= "*" ;
		car= strlen(hehe[com]) ;
		hehe[com][car]= a ;
		car= strlen(hehe[com]) ;
		hehe[com][car]= b ;
		car= strlen(hehe[com]) ;
		hehe[com][car]= ".txt" ;
/*ligne 46*/path[com] = hehe[com] ;
	}
	for(x= 0; x != 200; x++)
	{
		if((fp2[x]= fopen(path2[x], "w")) == NULL)
			printf("Erreur2\n") ;
		for(y= 0; y!= 1000; y++)
			z= putc(tab[x][y], fp) ;
		close(fp2[x]) ;
	}
return(0) ;
}
Les deux erreurs :

46 * invalid use of array with unspecified bounds
46 * invalid use of array with unspecified bounds

Deux petites erreurs que je ne comprends pas.


Et tant qu'on y est, même si ca n'a rien à voir, je voulais savoir si il était possible de créer un fichier éxéctable avec un script.

Si oui, tutos, fonctions ....

Merci d'avance.