I have a question how to download a line of text from the file without specifying the size of this line? I wouldn't want to use fgets because you have to give the fgets to the characters in advance. I can load the whole file, but not one line.
FILE *f
long lSize;
char *buffer;
size_t result;
f = fopen("file.txt", "r");
fseek(f, 0, SEEK_END);
lSize = ftell(f);
rewind (f);
buffer = (char*)malloc(sizeof(char)*lSize);
result = fread(buffer,1,lSize, f);
fclose(f);
free(buffer);