Enregistrer la position courante du fichier à l’aide de ‘int fgetpos(FILE *stream, fpos_t *position)’

Author:


Download

  #include 
  #include 

  int main(int argc, char *argv[])
  {
      FILE *fichier;
      fpos_t file_loc;

	  // Tentative d'ouverture
      if((fichier=fopen("test","r"))==NULL)
	  {
          printf("Impossible d'ouviri le fichier.");
          exit(1);
      }

	  // Enregistrer la position du fichier
      fgetpos(fichier ,&file_loc);

      fclose(fichier);

	  return 0;
  }

Leave a Reply

Your email address will not be published. Required fields are marked *