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
| #include <stdlib.h>
#include <stdio.h>
#include <string.h>
main()
{
int i=0;
int j=0;
char c2;
char c;
c=0;
c2=0;
char a[65000][2560];
for(i=0;i<65000 ;i++){a[i][i]=calloc(10,sizeof(char));}
i=1;
j=1;
FILE *fp=fopen("/sdcard/GDE.Main/tt.txt","a+");
rewind(fp);
do{
fgets(&c,1,fp);
fseek(fp,1,SEEK_CUR);
fgets(&c2,1,fp);
fseek(fp,-1,SEEK_CUR);
if (strcmp(&c,"/")==0&&strcmp(&c2,"t")==0)j++;
if (strcmp(&c,"/")==0 && strcmp(&c2,"n")==0){ i++,j=1;};
strcat(&a[i][j],&c);
}while (feof(fp)==0);
fclose(fp);
return 0;
} |
Partager