Ok, here is the code...
ok, it is the ftell(fp) that returns the error (i.e. -1). Now, I know that the file opens, since in the full source I check for a null pointer (and visually checked it during dubug. Also I know that the file is not empty, (it is 204 bytes large and is valid when viewd on my desktop. So, any ideas?
- Code:
FILE *fp; // file pointer to the configuration file
fp = fopen(nf, "rt");
fseek(fp, 0, SEEK_END);
config_size = ftell(fp);
ok, it is the ftell(fp) that returns the error (i.e. -1). Now, I know that the file opens, since in the full source I check for a null pointer (and visually checked it during dubug. Also I know that the file is not empty, (it is 204 bytes large and is valid when viewd on my desktop. So, any ideas?