Bonjour
voila tout d'abord 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
35
36
 
typedef struct tuyau Tuyau;
struct tuyau
{
    int visible;
    int entre_hb;
    int entre_gd;
    GtkWidget *image;
 
};
 
 
void initimage(Tuyau tuyau[])
{
 
    tuyau->visible = 0;
    tuyau->image = gtk_image_new_from_file("./Im9.jpg");
}
 
 
 for(i = 0; i<36; i++)
    {
        initimage(tuyau[i]);
        (tuyau[i])->image =  gtk_button_new();
 
    }
 
    k = 0;
    for(i = 2; i<8; i++)
    {
        for(j = 0; j<6; j++)
        {
            gtk_table_attach_defaults(GTK_TABLE(table), tuyau[k],i, i+1, j, j+1);
            k++;
        }
    }
voila donc dans un fichier .h je construit ma structure tuyau, dans mon main.c j'ai ma fonction initimage et dans ma fonction main mes trois boucle for.

lorsque je compile avec codebloks le jeu (oui ce code provient d'un jeu ^_^) se lance mais s'arrete tout de suite avec une erreur windows "jeux.exe" a cesser de fonctionner...

j'ai cette erreur depuis que j'ai rajouté mes boucle for.

Quelqu'un comprend mon erreur ?

merci d'avance