Réponse acceptée !
faut que tu passe ton entier par pointeur a ta fonction. int CFichier::LitUnEntier(int * iEntier) dans ton code une nouvelle variable est crée pour la fonction et détruite à la sortie.
int CFichier::LitUnEntier(int * iEntier) { if(m_pFile!=NULL) { int iRes; iRes=fscanf(m_pFile,"%d\n",iEntier); if(iRes!=EOF) return Fichier_OK; else return EOF; } else return Fichier_KO; }
et tu appelle ta fonction par element.LitUnEntier(&iEntier);
|