IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

avec Java Discussion :

Erreurs dans compilation


Sujet :

avec Java

  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    80
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2008
    Messages : 80
    Par défaut Erreurs dans compilation
    bonsoir a tous,

    j'ai ecrit ce code afin de générer un fichier binaire "final.bin" a partir d'une concatenation de trois tableaux d'octets...

    mais je ne peux le compiler car le compilateur m affiche :

    1. ERROR in GenererFMI_224_1.java
    (at line 402)
    public void generer(){
    ^^^^^^^^^
    Duplicate method generer() in type GenererFMI_224_1
    ----------
    2. ERROR in GenererFMI_224_1.java
    (at line 429)
    generer();
    ^^^^^^^^^
    Return type for the method is missing
    ----------
    3. ERROR in GenererFMI_224_1.java
    (at line 429)
    generer();
    ^^^^^^^^^
    Duplicate method generer() in type GenererFMI_224_1
    ----------
    4. ERROR in GenererFMI_224_1.java
    (at line 429)
    generer();
    ^^^^^^^^^
    This method requires a body instead of a semicolon
    ----------


    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
    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
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    import java.io.*;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
     
     
     
    public class  GenererFMI_224_1{
     
     
     
     
    	public static void main(String[] args)	{
     
     
    						}
     
     
     
     
    public static byte [] getHeader()
    	{
    	byte [] tab= new byte [25];
     
    	tab[0]=	(byte)0x03;
     
    	tab[1]=	(byte)0x01;
     
    	tab[2]=	(byte)0x00;
     
    	tab[3]=	(byte)0x00;
    	tab[4]=	(byte)0x00;
    	tab[5]=	(byte)0x19;
     
    	tab[6]=	(byte)0x00;
    	tab[7]=	(byte)0x00;
    	tab[8]=	(byte)0x32;
     
    	tab[9]=	(byte)0x02;
     
    	tab[10]=(byte)0x00;
     
    	tab[11]=(byte)0x00;
    	tab[12]=(byte)0x00;
    	tab[13]=(byte)0x4B;
     
    	tab[14]=(byte)0x00;
    	tab[15]=(byte)0x09;
    	tab[16]=(byte)0x96;
     
    	tab[17]=(byte)0xE0;
    	tab[18]=(byte)0x00;
     
    	tab[19]=(byte)0x00;
    	tab[20]=(byte)0x09;	
    	tab[21]=(byte)0xE1;
     
    	tab[22]=(byte)0x00;
    	tab[23]=(byte)0x00;
    	tab[24]=(byte)0x5A;
     
     
    	return tab;
     
     
    }
     
     
     
     
    public static byte [] getFragmentManagement()
    	{
    	byte [] tab= new byte[50];
     
    	tab[0]=	(byte)0xFF;
    	tab[1]=	(byte)0x21;
    	tab[2]=	(byte)0x00;
    	tab[3]=	(byte)0x00;
    	tab[4]=	(byte)0x00;
    	tab[5]=	(byte)0x00;
    	tab[6]=	(byte)0x00;
    	tab[7]=	(byte)0x00;
    	tab[8]=	(byte)0x00;
    	tab[9]=	(byte)0x02;
     
    	tab[10]=(byte)0x00;
    	tab[11]=(byte)0x00;
    	tab[12]=(byte)0x00;
    	tab[13]=(byte)0x16;
    	tab[14]=(byte)0x00;
    	tab[15]=(byte)0x00;
    	tab[16]=(byte)0x00;
    	tab[17]=(byte)0x03;
    	tab[18]=(byte)0x00;
    	tab[19]=(byte)0x00;
    	tab[20]=(byte)0x00;
     
    	tab[21]=(byte)0x2C;
    	tab[22]=(byte)0x00;
    	tab[23]=(byte)0x00;
    	tab[24]=(byte)0x00;
    	tab[25]=(byte)0x04;
    	tab[26]=(byte)0x00;
    	tab[27]=(byte)0x00;
    	tab[28]=(byte)0x00;
    	tab[29]=(byte)0x42;
     
    	tab[30]=(byte)0x00;
    	tab[31]=(byte)0x00;
    	tab[32]=(byte)0x00;
    	tab[33]=(byte)0x05;
    	tab[34]=(byte)0x00;
    	tab[35]=(byte)0x00;
    	tab[36]=(byte)0x00;
    	tab[37]=(byte)0x4A;
    	tab[38]=(byte)0x00;
    	tab[39]=(byte)0x00;
     
    	tab[40]=(byte)0x00;
    	tab[41]=(byte)0x06;
    	tab[42]=(byte)0x00;
    	tab[43]=(byte)0x00;
    	tab[44]=(byte)0x00;
    	tab[45]=(byte)0x52;
    	tab[46]=(byte)0x00;
    	tab[47]=(byte)0x00;
    	tab[48]=(byte)0x00;
    	tab[49]=(byte)0x00;
    	tab[50]=(byte)0x07;
     
     
     
    	return tab;
     
     
     
    	}
     
     
    public static byte [] getDataRepository()
    		{	
    		try {	RandomAccessFile raf= new RandomAccessFile ("Result_221.1.dat", "r");
    			boolean fin=false;
    			int i=0;
    			raf.seek(50);
    			byte [] tab = new byte[2454];
    			int n=raf.read(tab);
    			System.out.println("buffer length "+n);
    				//bb[0]=b;
    				//System.out.print(new String (bb));
    				//i++;
     
    				//byte [] buffer=new byte[9407];
    			        //int n= raf8.read(buffer);
    			        //System.out.println("GZIP Buffer of length "+n);
    				//byte tab[]= new byte [9407 -964];
    			        //System.arraycopy(buffer,964, tab,0,(9407-964));
    			        //System.arraycopy(bb,0, buffer,51,(10000-35));	
    			return tab;	}
    		catch (Exception e)
    		{
    			e.printStackTrace();
    		}
    		return null;
    	}
     
     
     
    public static byte[] getESGDataRepository()
    	{
    	byte[] tab= new byte[90];
     
    //00 00 13 00 23 10 f0 39 0 0 c3 c0 84 04 34 34 1c 1c 68 5c 87 83 00 84 13 00 23 10 f0 39 00 01 43 c0 84 04 34 34 1c 1c 5
     
    	tab[0]=(byte)0x00;
    	tab[1]=(byte)0x00;
    	tab[2]=(byte)0x13;
    	tab[3]=(byte)0x00;
    	tab[4]=(byte)0x23;
    	tab[5]=(byte)0x10;
    	tab[6]=(byte)0xF0;
    	tab[7]=(byte)0x39;
    	tab[8]=(byte)0x00;
    	tab[9]=(byte)0x00;
     
    	tab[10]=(byte)0xC3;
    	tab[11]=(byte)0xC0;
    	tab[12]=(byte)0x84;
    	tab[13]=(byte)0x04;
    	tab[14]=(byte)0x34;
    	tab[15]=(byte)0x34;
    	tab[16]=(byte)0x1C;
    	tab[17]=(byte)0x1C;
    	tab[18]=(byte)0x68;
    	tab[19]=(byte)0x5C;
    	tab[20]=(byte)0x87;
     
    	tab[21]=(byte)0x83;
    	tab[22]=(byte)0x00;
    	tab[23]=(byte)0x84;
    	tab[24]=(byte)0x13;
    	tab[25]=(byte)0x00;
    	tab[26]=(byte)0x23;
    	tab[27]=(byte)0x10;
    	tab[28]=(byte)0xF0;
    	tab[29]=(byte)0x39;
     
    	tab[30]=(byte)0x00;
    	tab[31]=(byte)0x01;
    	tab[32]=(byte)0x43;
    	tab[33]=(byte)0xC0;
    	tab[34]=(byte)0x84;
    	tab[35]=(byte)0x04;
    	tab[36]=(byte)0x34;
    	tab[37]=(byte)0x34;
    	tab[38]=(byte)0x1C;
    	tab[39]=(byte)0x1C;
     
    //c 87 83 01 08 13 00 23 10 f0 39 00 00 43 c0 84 04 34 34 1c 1c 68 5c 87 83 01 8a 05 00 25 10 02 1f 04 8e 05 00 25 10 
     
    //02 1f 07 12 05 00 25 10 02 1f
     
    	tab[40]=(byte)0x05;
    	tab[41]=(byte)0x0C;
    	tab[42]=(byte)0x87;
    	tab[43]=(byte)0x83;
    	tab[44]=(byte)0x01;
    	tab[45]=(byte)0x08;
    	tab[46]=(byte)0x13;
    	tab[47]=(byte)0x00;
    	tab[48]=(byte)0x23;
    	tab[49]=(byte)0x10;
    	tab[50]=(byte)0xF0;
    	tab[51]=(byte)0x39;
     
    	tab[52]=(byte)0x00;
    	tab[53]=(byte)0x00;
    	tab[54]=(byte)0x43;
    	tab[55]=(byte)0xC0;
    	tab[56]=(byte)0x84;
    	tab[57]=(byte)0x04;
    	tab[58]=(byte)0x34;
    	tab[59]=(byte)0x34;
    	tab[60]=(byte)0x1C;
     
    	tab[61]=(byte)0x1C;
    	tab[62]=(byte)0x68;
    	tab[63]=(byte)0x5C;
    	tab[64]=(byte)0x87;
    	tab[65]=(byte)0x83;
    	tab[66]=(byte)0x01;
    	tab[67]=(byte)0x8A;
    	tab[68]=(byte)0x05;
    	tab[69]=(byte)0x00;
    	tab[70]=(byte)0x25;
    	tab[71]=(byte)0x10;
     
    	tab[72]=(byte)0x02;
    	tab[73]=(byte)0x1F;
    	tab[74]=(byte)0x04;
    	tab[75]=(byte)0x8E;
    	tab[76]=(byte)0x05;
    	tab[77]=(byte)0x00;
    	tab[78]=(byte)0x25;
    	tab[79]=(byte)0x10;
    	tab[80]=(byte)0x02;
     
    	tab[81]=(byte)0x1F;
    	tab[82]=(byte)0x07;
    	tab[83]=(byte)0x12;
    	tab[84]=(byte)0x05;
    	tab[85]=(byte)0x00;
    	tab[86]=(byte)0x25;
    	tab[87]=(byte)0x10;
    	tab[88]=(byte)0x02;
    	tab[89]=(byte)0x1F;
     
     
     
    	return tab;
     
    }
    		/*FileOutputStream fos = null;
    		try
    		{
    			fos = new FileOutputStream("ESGAccessDescriptor.bin");
    			fos.write(bos.toByteArray());
    		}*/
     
     
      public byte[] concat(byte[] tab1, byte[] tab2, byte[] tab3){
            byte[] tabResult = new byte[tab1.length + tab2.length + tab3.length];
            int count = 0;
            for(int i=0; i<tab1.length; i++)
                tabResult[count++] = tab1[i];
            for(int i=0; i<tab2.length; i++)
                tabResult[count++] = tab2[i];
    	for(int i=0; i<tab3.length; i++)
                tabResult[count++] = tab3[i];
            return tabResult;
        }
     
    	//byte[] result = concat(getHeader(), getFragmentManagement(), getDataRepository());
     
    //File fd = new File("septembre.bin");
     
    //OutputStream fos = new FileOutputStream(fd);
    //public void write(byte[] b) throws IOException
     
    public void generer(){
    byte[] tableauFINAL = concat(getHeader(), getFragmentManagement(), getDataRepository());
    		FileOutputStream flux = null;
    		try
    		{	
    			flux = new FileOutputStream("Final.bin");
    			flux.write(tableauFINAL);
     
    		}
    		catch (Exception e)
    		{
    			e.printStackTrace();
    		}
    		finally
    		{
    			// On ferme toujours le flux pour libèrer les ressources
    			try
    			{
    			flux.close();
    			}
    			catch (Exception e)
    			{
    			}
    		}
     
    }
     
    generer();
     
     
     
    };
    MERCI a tous

  2. #2
    Membre Expert
    Avatar de natha
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 346
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 346
    Par défaut
    C'est quoi ce "generer();" tout seul à la fin du code... un petit résidu inutile qui traîne ?

    Pour identifier plus rapidement ces problèmes d'inattention, travaille avec un IDE (si tu le peux) genre Eclipse ou Netbeans. Ca te simplifiera la vie.

  3. #3
    Membre confirmé
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    80
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2008
    Messages : 80
    Par défaut
    Citation Envoyé par natha Voir le message
    C'est quoi ce "generer();" tout seul à la fin du code... un petit résidu inutile qui traîne ?

    Pour identifier plus rapidement ces problèmes d'inattention, travaille avec un IDE (si tu le peux) genre Eclipse ou Netbeans. Ca te simplifiera la vie.
    en fait je veux appeler "generer" pour k elle s execute!! je dois l appeler non? ou eske je me trompe?? merci de m avoir repondu aussi promptement

  4. #4
    Membre Expert
    Avatar de natha
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 346
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 346
    Par défaut
    Pour appeler une méthode il faut l'appeler dans une autre méthode, pas dans le corps de la classe !

  5. #5
    Membre confirmé
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    80
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2008
    Messages : 80
    Par défaut
    Citation Envoyé par natha Voir le message
    Pour appeler une méthode il faut l'appeler dans une autre méthode, pas dans le corps de la classe !
    d accord alors a ton avis comment je dois m y prendre?? ca m aiderai enormement si tu pouvais etre plus explicite..je suis novice en java

  6. #6
    Membre Expert
    Avatar de natha
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 346
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 346
    Par défaut
    Il te faut un point d'entrée à l'application.
    Le point d'entrée, en Java, c'est la méthode "main" :

    Par exemple :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    public static void main(String[] args) {
        generer();
    }

  7. #7
    Membre confirmé
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    80
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2008
    Messages : 80
    Par défaut
    Citation Envoyé par natha Voir le message
    Il te faut un point d'entrée à l'application.
    Le point d'entrée, en Java, c'est la méthode "main" :

    Par exemple :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    public static void main(String[] args) {
        generer();
    }

    je viens de l essayer mais le compilateur m a retourné cette erreur :

    1. ERROR in GenererFMI_224_1.java
    (at line 15)
    generer();
    ^^^^^^^
    Cannot make a static reference to the non-static method generer() from the type GenererFMI_224_1


    que me conseillez vous de faire??

  8. #8
    Membre Expert
    Avatar de natha
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    2 346
    Détails du profil
    Informations personnelles :
    Localisation : Suisse

    Informations forums :
    Inscription : Janvier 2006
    Messages : 2 346
    Par défaut
    Euhhh oui pardon :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    new GenererFMI_224_1().generer();
    Il faut bien sûr créer une instance de la classe pour appeler une méthode non statique. J'ai répondu trop vite.

  9. #9
    Membre confirmé
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    80
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2008
    Messages : 80
    Par défaut
    Citation Envoyé par natha Voir le message
    Euhhh oui pardon :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    new GenererFMI_224_1().generer();
    Il faut bien sûr créer une instance de la classe pour appeler une méthode non statique. J'ai répondu trop vite.
    excuse moi encore une fois : cette instruction je l insère en dehors du main non???

  10. #10
    Membre très actif
    Inscrit en
    Mars 2008
    Messages
    283
    Détails du profil
    Informations forums :
    Inscription : Mars 2008
    Messages : 283
    Par défaut
    Fait des erreurs ... essaie hors de main, et dans le main, tu comprendra je pense.

    Pour t'éviter un casse tête horrible, rajoute des parenthèses :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    (new GenererFMI_224_1()).generer();
    Le constructeur ne retourne rien, c'est l'opérateur "new" qui te génère ton objet.
    Pour récupérer l'objet et agir directement, il faut l'entourer par des parenthèses.

  11. #11
    Membre confirmé
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    80
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2008
    Messages : 80
    Par défaut
    Citation Envoyé par Grimly Voir le message
    Fait des erreurs ... essaie hors de main, et dans le main, tu comprendra je pense.

    Pour t'éviter un casse tête horrible, rajoute des parenthèses :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    (new GenererFMI_224_1()).generer();
    Le constructeur ne retourne rien, c'est l'opérateur "new" qui te génère ton objet.
    Pour récupérer l'objet et agir directement, il faut l'entourer par des parenthèses.
    bonjour,

    en fait si je la met dans le main il me retourne des exceptions...
    sinon si j l ajoute en bas de mon code, ca compile correctement et ca s execute mais curieusement le fichier que je veux générer n'est pas généré...

    quant je fais "ls" je m apercois que le fichier Final.bin n'existe pas..

    vraiment je suis perdu...je comprends pas pourquoi ca ne marche pas..

    PS : j ai trouvé une erreur dans la génération d un de mes tableau qui est initialisé à 50 octets alors que j y ai instancié 51 octets..mais bon ca ne marche tjrs pas...

  12. #12
    Membre Expert
    Avatar de CheryBen
    Inscrit en
    Mai 2005
    Messages
    1 599
    Détails du profil
    Informations personnelles :
    Âge : 43

    Informations forums :
    Inscription : Mai 2005
    Messages : 1 599
    Par défaut
    Bonjour, je crois qu'il faudrait que tu prennes un livre pour débuter en java.

  13. #13
    Membre confirmé
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    80
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2008
    Messages : 80
    Par défaut
    Citation Envoyé par morph41 Voir le message
    Bonjour, je crois qu'il faudrait que tu prennes un livre pour débuter en java.
    j aimerai bien mais c est que je dois faire ce bout de code imperativement...tu peux me dire si mon programme est viable ou pas??

  14. #14
    Membre Expert
    Avatar de CheryBen
    Inscrit en
    Mai 2005
    Messages
    1 599
    Détails du profil
    Informations personnelles :
    Âge : 43

    Informations forums :
    Inscription : Mai 2005
    Messages : 1 599
    Par défaut
    Si ton main est vide, l'application ne fera rien du tout.

    C'est la méthode main qui est appelée au démarrage du programme, tout code qui n'est pas appelé dans cette méthode ou dans un méthode appelée dans le main ne sera pas exécuté.

    -> appelle ta méthode generer dans le main.

  15. #15
    Membre expérimenté Avatar de Seb19
    Homme Profil pro
    Concepteur SOA
    Inscrit en
    Septembre 2005
    Messages
    217
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : France, Deux Sèvres (Poitou Charente)

    Informations professionnelles :
    Activité : Concepteur SOA

    Informations forums :
    Inscription : Septembre 2005
    Messages : 217
    Par défaut
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    public static byte [] getFragmentManagement() {
    	byte [] tab= new byte[50];
    ....
    }
    Tu as également une erreur dans la méthode ci dessus, tu déclares un tableau de 50 mais tu alimentes 51 cases.

  16. #16
    Membre expérimenté
    Inscrit en
    Octobre 2007
    Messages
    311
    Détails du profil
    Informations forums :
    Inscription : Octobre 2007
    Messages : 311
    Par défaut
    Citation Envoyé par SeptembreNoir84 Voir le message
    bonjour,
    PS : j ai trouvé une erreur dans la génération d un de mes tableau qui est initialisé à 50 octets alors que j y ai instancié 51 octets..mais bon ca ne marche tjrs pas...
    Qu'entends-tu par "ca ne marche toujours pas" ? Tu as une exception ? Ton fichier d'entrée contient qqch ?

  17. #17
    Membre confirmé
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    80
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2008
    Messages : 80
    Par défaut
    Citation Envoyé par morph41 Voir le message
    Si ton main est vide, l'application ne fera rien du tout.

    C'est la méthode main qui est appelée au démarrage du programme, tout code qui n'est pas appelé dans cette méthode ou dans un méthode appelée dans le main ne sera pas exécuté.

    -> appelle ta méthode generer dans le main.
    mais c'est ce que je me disais...en fait j ai déja mis cet appel dans le main (ce qui me paraissait etre des plus logique) sauf qu il me ressortait des exceptions et j arrivais pas a comprendre pourquoi !!!!!!!!!!!!!!!!

    EN FAIT J AVAIS TOUT SIMPLEMENT OUBLIÉ DE SAUVEGARDER !!! mea culpa!!

    et stp excuse moi encore morph !!

  18. #18
    Membre confirmé
    Profil pro
    Inscrit en
    Mars 2008
    Messages
    80
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2008
    Messages : 80
    Par défaut
    Citation Envoyé par DevTeam_ Voir le message
    Qu'entends-tu par "ca ne marche toujours pas" ? Tu as une exception ? Ton fichier d'entrée contient qqch ?
    ttes mes excuses DevTeam j avais juste omis de sauvegarder avant de recompiler!! ca marche a merveille et j ai mon fichier binaire!! HOURRAAAAAAAA

    en fait quant j ai corrigé la taille d un des tableaux j ai oublié de sauvegarder..c est pour ca qu il me ressortait des exceptions liées a ca!! ce n'est qu'apres que j me suis rendu compte que j avais un problème d allocation de mémoire...en tout cas merci a tous d etre venu en aide à un débutant comme moi..vraiment gentil de votre part..merci

  19. #19
    Membre expérimenté
    Inscrit en
    Octobre 2007
    Messages
    311
    Détails du profil
    Informations forums :
    Inscription : Octobre 2007
    Messages : 311
    Par défaut
    J'appuie fortement l'idée de natha quant à un IDE, car il t'aurait informé que ton fichier n'était pas sauvegardé lors du lancement... Et vu qu'il compile à la volée, tu sais directement où ça risque de pêter...

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Compiler] Erreur dans compilation avec une toolbox independante
    Par ImagingAllthe dans le forum MATLAB
    Réponses: 4
    Dernier message: 25/03/2008, 16h42
  2. [mono] Compilation sous linux, erreur dans windows
    Par AlexandreP dans le forum Mono
    Réponses: 6
    Dernier message: 18/08/2006, 19h56
  3. Réponses: 4
    Dernier message: 10/07/2006, 19h23
  4. Erreur de compilation de winsock.h dans VC++2005
    Par Jakariba dans le forum MFC
    Réponses: 3
    Dernier message: 24/05/2006, 15h54
  5. [Servlet][Compilation] Erreur de compil dans code servlet
    Par gandalf_le_blanc dans le forum Servlets/JSP
    Réponses: 3
    Dernier message: 13/05/2004, 10h17

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo