How can I open a file for C language reading, over 100 MB?
With this code placed below, I can read a file with more than 18,000 lines, but what I really need is to read a file with approximately 5,000,000 lines.
Is this possible in C?
char **xxxx;
if ( ( arq = fopen("Meuarquivo.txt", "r+b" ) ) == NULL ){
printf("Houve um erro na abertura do arquivo");
getche();exit(1);
}
xxxx = ( char** ) malloc ( 19000 *sizeof ( char* ) );
while ( feof ( arq ) == 0 ){
nomes [ c ] = ( char* ) malloc ( 19000 *sizeof ( char ) );
fgets ( nomes [ c ], 19000, arq );
++c;
}