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

C Discussion :

Allocation memoire


Sujet :

C

  1. #1
    Inactif
    Profil pro
    Inscrit en
    Décembre 2005
    Messages
    72
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2005
    Messages : 72
    Par défaut Allocation memoire
    Bonjour,
    voici différents code.
    Est ce que vous pourriez me dire si les allocations,les affectations sont bien faites,les erreurs à corriger.

    Merci d'avance


    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
    #define MAX 50
    #define LIBRE 0
    #define OCCUPE 1
     
    enum Type{Constante,Operateur};
     
    union Info
    {
    double cte;
    char op;
    }
     
     
    typedef struct noeud
    {
    enum Type type;
    union Info info;
    struct noeud*gauche;
    struct noeud*droit;
    }Noeud,*Arbre ;
     
    typedef struct
    {
    char *param ;
    Arbre arbreparam ;
    }TableFonction ;
     
     
    typedef struct 
    {
    char *nom ;
    int nb_param ;
    TableFonction *fct ;
    Arbre a ;
    int etat ;
    }Symbole ;
     
    typedef struct
    {
    Symbole tab[MAX].
    }Table ;
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    void Init(Table *table)
    {
    unsigned int i;
    for(i=0; i<MAX; i++)
       {
         table->tab[i].nom=NULL;
         table->tab[i].nb_param=0;
         table->tab[i].fct=NULL;
         table->tab[i].a=NULL;
         table->tab[i].etat=LIBRE;
        }
    }

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    int hash(const char *nom)
    {
      int som=0;
      int i;
      for(i=0; i<MAX; i++)
        som+=nom[i];
      return som%MAX;
    }
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    /* Recherche la position d'un nom dans la table */
    unsigned int RecherchePos(Table *table,const char *nom)
    {
      unsigned int pos ;
     
      for(pos = 0U; pos<Env->taille; ++pos)
        if(Env->tab[pos].nom != NULL && (!(strcmp(nom,Env->ta[pos].nom))))
          return pos;
      return MAX;
    }
    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
    /* Ajout d'une fonction dans la table des symboles */
    int AddFonction(Table *table,const char *nom, int nb_parametres, char **tabparam, Arbre a)
    {
      unsigned pos = RecherchePos(table,nom);
     
      if(pos != MAX)/* deja present */
         return 1;
     
       unsigned int indice = hash(nom);
       unsigned int marque = indice;
     
       if(table->tab[indice].etat == OCCUPE)
           {
             indice ++;
             while(table->tab[indice].etat ==OCCUPE && indice != marque)
                {
                   if(indice < MAX)
                     indice ++;
                   else
                     indice -=MAX;
                }
           }
     
        if(indice == marque)
          {
             fprintf(stderr,"la table est remplit\n");
             return 1 ;
          }
     
        table->tab[indice].nom = (char*)malloc(strlen(nom)+1);
        if(table->tab[indice].nom == NULL)
          {
            fprintf(stderr,"erreur allocation\n");
            return 1 ;
           }
       strcpy(table->tab[indice].nom,nom);
     
       table->tab[indice].nb_parametres = nb_parametres;
     
       int i ;
       table->tab[indice].fct = (TableFonction*)malloc(sizeof(TableFonction)*nb_param);
       if(table->tab[indice].fct == NULL)
          return 1;
     
      for(i=0; i<nb_param; i++)
        {
          table->tab[indice].fct[i].nom = malloc(strlen(tabparam[i])+1);
           if(table->tab[indice].fct[i].nom == NULL)
              return 1;
          strcpy(table->tab[indice].fct[i].nom,tabparam[i]);
          table->tab[indice].fct[i].arbreparam = NULL;
        }
     
       table->tab[indice].a = a;
       table->tab[indice].etat = OCCUPE;
       return 0;
    }

    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
    int RechercheFonction(Table *table,const char *nom,int *nb_param,char **tabparam,Arbre *a)
    {
      unsigned pos = RecherchePos(Env,nom);
     
      if(pos == MAX)/* pas trouve */
         return 1 ;
      *nb_param = table->tab[indice].nb_param;
     
      tabparam = malloc(sizeof(*tabparam)*(*nb_param));
      if(tabparam==NULL)
          return 1;
     
      int i;
      for(i=0; i<(*nb_param); i++)
       {
          tabparam[i] = malloc(sizeof(**tabparam)*(strlen(table->tab[pos].fct[i].nom)+1));
          if(tabparam[i] == NULL)
               return 1;
         strcpy(tabparam[i],table->tab[pos].fct[i].nom);
       }
      *a = table->tab[pos].a;
     return 0;
    }

  2. #2
    Membre émérite
    Profil pro
    Inscrit en
    Juillet 2002
    Messages
    487
    Détails du profil
    Informations personnelles :
    Âge : 56
    Localisation : France, Maine et Loire (Pays de la Loire)

    Informations forums :
    Inscription : Juillet 2002
    Messages : 487
    Par défaut
    Et puis tu donnera la meilleure note à celui aura trouvé le plus d'erreurs ?

  3. #3
    Expert éminent
    Avatar de Emmanuel Delahaye
    Profil pro
    Retraité
    Inscrit en
    Décembre 2003
    Messages
    14 512
    Détails du profil
    Informations personnelles :
    Âge : 68
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Retraité

    Informations forums :
    Inscription : Décembre 2003
    Messages : 14 512
    Par défaut Re: Allocation memoire
    Citation Envoyé par Gryzzly
    Bonjour,
    voici différents code.
    Est ce que vous pourriez me dire si les allocations,les affectations sont bien faites,les erreurs à corriger.
    Je commencerais par poster du code compilable...
    Compiling: main.c
    main.c:20: error: two or more data types in declaration of `Noeud'
    main.c:20: error: two or more data types in declaration of `Arbre'
    main.c:40: warning: no semicolon at end of struct or union
    main.c:40: error: syntax error before '.' token
    main.c:41: warning: type defaults to `int' in declaration of `Table'
    main.c:41: warning: data definition has no type or storage class
    main.c:61: warning: no previous prototype for 'hash'
    main.c:71: error: syntax error before '*' token
    main.c:72: warning: function declaration isn't a prototype
    main.c: In function `RecherchePos':
    main.c:75: error: `Env' undeclared (first use in this function)
    main.c:75: error: (Each undeclared identifier is reported only once
    main.c:75: error: for each function it appears in.)
    main.c:76: error: `NULL' undeclared (first use in this function)
    main.c:76: error: implicit declaration of function `strcmp'
    main.c:76: warning: nested extern declaration of `strcmp'
    <internal>:0: warning: redundant redeclaration of 'strcmp'
    main.c:76: error: `nom' undeclared (first use in this function)
    main.c: At top level:
    main.c:83: error: syntax error before '*' token
    main.c:84: warning: function declaration isn't a prototype
    main.c: In function `AddFonction':
    main.c:85: error: `table' undeclared (first use in this function)
    main.c:85: error: `nom' undeclared (first use in this function)
    main.c:107: error: implicit declaration of function `fprintf'
    main.c:107: warning: nested extern declaration of `fprintf'
    <internal>:0: warning: redundant redeclaration of 'fprintf'
    main.c:107: error: `stderr' undeclared (first use in this function)
    main.c:111: error: implicit declaration of function `malloc'
    main.c:111: warning: nested extern declaration of `malloc'
    <internal>:0: warning: redundant redeclaration of 'malloc'
    main.c:111: error: implicit declaration of function `strlen'
    main.c:111: warning: nested extern declaration of `strlen'
    <internal>:0: warning: redundant redeclaration of 'strlen'
    main.c:112: error: `NULL' undeclared (first use in this function)
    main.c:114: warning: nested extern declaration of `fprintf'
    <internal>:0: warning: redundant redeclaration of 'fprintf'
    main.c:117: error: implicit declaration of function `strcpy'
    main.c:117: warning: nested extern declaration of `strcpy'
    <internal>:0: warning: redundant redeclaration of 'strcpy'
    main.c:119: error: `nb_parametres' undeclared (first use in this function)
    main.c:122: error: `nb_param' undeclared (first use in this function)
    main.c:128: error: `tabparam' undeclared (first use in this function)
    main.c:135: error: `a' undeclared (first use in this function)
    main.c: At top level:
    main.c:141: error: syntax error before '*' token
    main.c:142: warning: function declaration isn't a prototype
    main.c: In function `RechercheFonction':
    main.c:143: error: `Env' undeclared (first use in this function)
    main.c:143: error: `nom' undeclared (first use in this function)
    main.c:147: error: `nb_param' undeclared (first use in this function)
    main.c:147: error: `table' undeclared (first use in this function)
    main.c:147: error: `indice' undeclared (first use in this function)
    main.c:149: error: `tabparam' undeclared (first use in this function)
    main.c:149: warning: nested extern declaration of `malloc'
    <internal>:0: warning: redundant redeclaration of 'malloc'
    main.c:150: error: `NULL' undeclared (first use in this function)
    main.c:156: warning: nested extern declaration of `strlen'
    <internal>:0: warning: redundant redeclaration of 'strlen'
    main.c:159: warning: nested extern declaration of `strcpy'
    <internal>:0: warning: redundant redeclaration of 'strcpy'
    main.c:161: error: `a' undeclared (first use in this function)
    Process terminated with status 1 (0 minutes, 0 seconds)
    33 errors, 16 warnings
    J'ai corrigé quelques bugs évidents,
    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
     
    #include <string.h>
    #include <stdio.h>
    #include <stdlib.h>
     
    #define MAX 50
    #define LIBRE 0
    #define OCCUPE 1
     
    enum Type
    {
       Constante,
       Operateur
    };
     
    union Info
    {
       double cte;
       char op;
    };
     
     
    typedef struct noeud
    {
       enum Type type;
       union Info info;
       struct noeud*gauche;
       struct noeud*droit;
    }
    Noeud, *Arbre ;
     
    typedef struct
    {
       char *param ;
       Arbre arbreparam ;
    }
    TableFonction ;
     
     
    typedef struct
    {
       char *nom ;
       int nb_param ;
       TableFonction *fct ;
       Arbre a ;
       int etat ;
    }
    Symbole ;
     
    typedef struct
    {
       Symbole tab[MAX];
    }
    Table ;
     
    static void Init(Table *table)
    {
       unsigned int i;
       for (i = 0; i < MAX; i++)
       {
          table->tab[i].nom = NULL;
          table->tab[i].nb_param = 0;
          table->tab[i].fct = NULL;
          table->tab[i].a = NULL;
          table->tab[i].etat = LIBRE;
       }
    }
     
     
     
    static int hash(const char *nom)
    {
       int som = 0;
       int i;
       for (i = 0; i < MAX; i++)
          som += nom[i];
       return som % MAX;
    }
     
     
    /* Recherche la position d'un nom dans la table */
    static unsigned int RecherchePos(Table *table, const char *nom)
    {
       unsigned int pos ;
     
       for (pos = 0U; pos < Env->taille; ++pos)
          if (Env->tab[pos].nom != NULL && (!(strcmp(nom, Env->ta[pos].nom))))
             return pos;
       return MAX;
    }
     
     
    /* Ajout d'une fonction dans la table des symboles */
    static int AddFonction(Table *table, const char *nom, int nb_parametres, char **tabparam, Arbre a)
    {
       unsigned pos = RecherchePos(table, nom);
     
       if (pos != MAX) /* deja present */
          return 1;
     
       unsigned int indice = hash(nom);
       unsigned int marque = indice;
     
       if (table->tab[indice].etat == OCCUPE)
       {
          indice ++;
          while (table->tab[indice].etat == OCCUPE && indice != marque)
          {
             if (indice < MAX)
                indice ++;
             else
                indice -= MAX;
          }
       }
     
       if (indice == marque)
       {
          fprintf(stderr, "la table est remplit\n");
          return 1 ;
       }
     
       table->tab[indice].nom = (char*)malloc(strlen(nom) + 1);
       if (table->tab[indice].nom == NULL)
       {
          fprintf(stderr, "erreur allocation\n");
          return 1 ;
       }
       strcpy(table->tab[indice].nom, nom);
     
       table->tab[indice].nb_parametres = nb_parametres;
     
       int i ;
       table->tab[indice].fct = (TableFonction*)malloc(sizeof(TableFonction) * nb_param);
       if (table->tab[indice].fct == NULL)
          return 1;
     
       for (i = 0; i < nb_param; i++)
       {
          table->tab[indice].fct[i].nom = malloc(strlen(tabparam[i]) + 1);
          if (table->tab[indice].fct[i].nom == NULL)
             return 1;
          strcpy(table->tab[indice].fct[i].nom, tabparam[i]);
          table->tab[indice].fct[i].arbreparam = NULL;
       }
     
       table->tab[indice].a = a;
       table->tab[indice].etat = OCCUPE;
       return 0;
    }
     
    static int RechercheFonction(Table *table, const char *nom, int *nb_param, char **tabparam, Arbre *a)
    {
       unsigned pos = RecherchePos(Env, nom);
     
       if (pos == MAX) /* pas trouve */
          return 1 ;
       *nb_param = table->tab[indice].nb_param;
     
       tabparam = malloc(sizeof(*tabparam) * (*nb_param));
       if (tabparam == NULL)
          return 1;
     
       int i;
       for (i = 0; i < (*nb_param); i++)
       {
          tabparam[i] = malloc(sizeof(**tabparam) * (strlen(table->tab[pos].fct[i].nom) + 1));
          if (tabparam[i] == NULL)
             return 1;
          strcpy(tabparam[i], table->tab[pos].fct[i].nom);
       }
       *a = table->tab[pos].a;
       return 0;
    }
     
    int main (void)
    {
       /* ajouter le code de test... */
       return 0;
    }
    mais d'autres relèvent de ta conception. (variables et champs inconnus). D'autre part, il faudrait fournir du code de test... On ne sait pas trop quoi appeler, comment, quels paramètres...
    Compiling: main.c
    main.c: In function `RecherchePos':
    main.c:85: error: `Env' undeclared (first use in this function)
    main.c:85: error: (Each undeclared identifier is reported only once
    main.c:85: error: for each function it appears in.)
    main.c: In function `AddFonction':
    main.c:129: error: structure has no member named `nb_parametres'
    main.c:132: error: `nb_param' undeclared (first use in this function)
    main.c:138: error: structure has no member named `nom'
    main.c:139: error: structure has no member named `nom'
    main.c:141: error: structure has no member named `nom'
    main.c: In function `RechercheFonction':
    main.c:152: error: `Env' undeclared (first use in this function)
    main.c:156: error: `indice' undeclared (first use in this function)
    main.c:165: error: structure has no member named `nom'
    main.c:168: error: structure has no member named `nom'
    main.c: At top level:
    main.c:56: warning: 'Init' defined but not used
    main.c:94: warning: 'AddFonction' defined but not used
    main.c:151: warning: 'RechercheFonction' defined but not used

  4. #4
    Inactif
    Profil pro
    Inscrit en
    Décembre 2005
    Messages
    72
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2005
    Messages : 72
    Par défaut
    Bonjour Emmanuel,

    Merci de m'avoir indiquer les warnings,erreur... car je ne peux pas tester mon code avant jeudi d'ou les erreurs.
    En suivant les warnings,j'ai corrigé les erreurs.
    Il m'est difficile de fournir un code de test car je n'ai pas les sources (car je ne suis pas chez moi) des fonctions qui permettent d'analyser une ligne et d'ajouter les fonctions dans la table.

    Je voudrais savoir si les différentes allocations mémoires que j'ai effectuer pour la fonction addFonction sont correctes et si le code que j'ai écris me permet effectivement de recuperer les parametres de la fonction,le nombre de parametres et l'arbre dans la fonction RechercheFonction.

    Merci d'avance


    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
     
    #include <string.h>
    #include <stdio.h>
    #include <stdlib.h>
     
    #define MAX 50
    #define LIBRE 0
    #define OCCUPE 1
     
    enum Type
    {
       Constante,
       Operateur
    };
     
    union Info
    {
       double cte;
       char op;
    };
     
     
    typedef struct noeud
    {
       enum Type type;
       union Info info;
       struct noeud*gauche;
       struct noeud*droit;
    }
    Noeud, *Arbre ;
     
    typedef struct
    {
       char *param ;
       Arbre arbreparam ;
    }
    TableFonction ;
     
     
    typedef struct
    {
       char *nom ;
       int nb_param ;
       TableFonction *fct ;
       Arbre a ;
       int etat ;
    }
    Symbole ;
     
    typedef struct
    {
       Symbole tab[MAX];
    }
    Table ;
     
    static void Init(Table *table)
    {
       unsigned int i;
       for (i = 0; i < MAX; i++)
       {
          table->tab[i].nom = NULL;
          table->tab[i].nb_param = 0;
          table->tab[i].fct = NULL;
          table->tab[i].a = NULL;
          table->tab[i].etat = LIBRE;
       }
    }
     
     
     
    static int hash(const char *nom)
    {
       int som = 0;
       int i;
       for (i = 0; i < MAX; i++)
          som += nom[i];
       return som % MAX;
    }
     
     
    /* Recherche la position d'un nom dans la table */
    static unsigned int RecherchePos(Table *table, const char *nom)
    {
       unsigned int pos ;
     
       for (pos = 0U; pos < MAX; ++pos)
          if (table->tab[pos].nom != NULL && (!(strcmp(nom, table->tab[pos].nom))))
             return pos;
       return MAX;
    }
     
     
    /* Ajout d'une fonction dans la table des symboles */
    static int AddFonction(Table *table, const char *nom, int nb_param, char **tabparam, Arbre a)
    {
       unsigned pos = RecherchePos(table, nom);
     
       if (pos != MAX) /* deja present */
          return 1;
     
       unsigned int indice = hash(nom);
       unsigned int marque = indice;
     
       if (table->tab[indice].etat == OCCUPE)
       {
          indice ++;
          while (table->tab[indice].etat == OCCUPE && indice != marque)
          {
             if (indice < MAX)
                indice ++;
             else
                indice -= MAX;
          }
       }
     
       if (indice == marque)
       {
          fprintf(stderr, "la table est remplit\n");
          return 1 ;
       }
     
       table->tab[indice].nom = (char*)malloc(strlen(nom) + 1);
       if (table->tab[indice].nom == NULL)
       {
          fprintf(stderr, "erreur allocation\n");
          return 1 ;
       }
       strcpy(table->tab[indice].nom, nom);
     
       table->tab[indice].nb_param = nb_param;
     
       int i ;
       table->tab[indice].fct = (TableFonction*)malloc(sizeof(TableFonction) * nb_param);
       if (table->tab[indice].fct == NULL)
          return 1;
     
       for (i = 0; i < nb_param; i++)
       {
          table->tab[indice].fct[i].param = malloc(strlen(tabparam[i]) + 1);
          if (table->tab[indice].fct[i].param == NULL)
             return 1;
          strcpy(table->tab[indice].fct[i].param, tabparam[i]);
          table->tab[indice].fct[i].arbreparam = NULL;
       }
     
       table->tab[indice].a = a;
       table->tab[indice].etat = OCCUPE;
       return 0;
    }
     
    static int RechercheFonction(Table *table, const char *nom, int *nb_param, char **tabparam, Arbre *a)
    {
       unsigned pos = RecherchePos(table, nom);
     
       if (pos == MAX) /* pas trouve */
          return 1 ;
       *nb_param = table->tab[pos].nb_param;
     
       tabparam = malloc(sizeof(*tabparam) * (*nb_param));
       if (tabparam == NULL)
          return 1;
     
       int i;
       for (i = 0; i < (*nb_param); i++)
       {
          tabparam[i] = malloc(sizeof(**tabparam) * (strlen(table->tab[pos].fct[i].param) + 1));
          if (tabparam[i] == NULL)
             return 1;
          strcpy(tabparam[i], table->tab[pos].fct[i].param);
       }
       *a = table->tab[pos].a;
       return 0;
    }
     
    int main (void)
    {
       /* ajouter le code de test... */
       return 0;
    }

  5. #5
    Expert éminent
    Avatar de Emmanuel Delahaye
    Profil pro
    Retraité
    Inscrit en
    Décembre 2003
    Messages
    14 512
    Détails du profil
    Informations personnelles :
    Âge : 68
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Retraité

    Informations forums :
    Inscription : Décembre 2003
    Messages : 14 512
    Par défaut
    Citation Envoyé par Gryzzly
    Bonjour Emmanuel,

    Merci de m'avoir indiquer les warnings,erreur... car je ne peux pas tester mon code avant jeudi d'ou les erreurs.
    En suivant les warnings,j'ai corrigé les erreurs.
    Si je comprends bien, je sers de compilateur... Je pense qu'il existe des compilateurs C 'en ligne'

    Par exemple :
    Comeau Computing : http://www.comeaucomputing.com/tryitout/

    Compiling: main.c
    main.c: In function `RecherchePos':
    main.c:85: error: structure has no member named `taille'
    main.c: At top level:
    main.c:56: warning: 'Init' defined but not used
    main.c:94: warning: 'AddFonction' defined but not used
    main.c:151: warning: 'RechercheFonction' defined but not used

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

Discussions similaires

  1. Allocation memoire et management de la memoire
    Par micamused dans le forum C++
    Réponses: 9
    Dernier message: 16/11/2005, 09h07
  2. probleme avec les allocations memoires
    Par david35 dans le forum C
    Réponses: 5
    Dernier message: 21/10/2005, 11h49
  3. allocation memoire
    Par suckthewindow dans le forum C++
    Réponses: 2
    Dernier message: 18/10/2005, 14h57
  4. Réponses: 13
    Dernier message: 05/01/2004, 19h00
  5. Allocation memoire Limité avec TurboC
    Par sebastien51 dans le forum Autres éditeurs
    Réponses: 3
    Dernier message: 15/10/2003, 23h32

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