5 Decembre
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#include<stdlib.h>
|
||||
#include<graph.h>
|
||||
#include<stdio.h>
|
||||
#include<string.h>
|
||||
|
||||
int main(int argn , char** const argv){
|
||||
FILE *f;
|
||||
char c;
|
||||
long l;
|
||||
f=fopen(argv[1],"r");
|
||||
if(f==NULL){
|
||||
printf("Le fichier n'existe pas.\n");
|
||||
} else{
|
||||
fread(&c,1,1,f);
|
||||
while (!(feof(f))){
|
||||
if(c=='e'){
|
||||
l=ftell(f)-1;
|
||||
fclose(f);
|
||||
fopen(argv[1],"r+");
|
||||
fseek(f,l,SEEK_SET);
|
||||
fwrite(&c,1,1,f);
|
||||
fclose(f);
|
||||
f=fopen(argv[1],"r");
|
||||
fread(&c,1,1,f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user