I don't know what you mean by name of the pointer. The filename, or the object name?
file = 0 because there's a problem opening the file:
Use errno to see which error occured.RETURN VALUES
Upon successful completion fopen(), fdopen(), and freopen() return a FILE
pointer. Otherwise, NULL is returned and the global variable errno is
set to indicate the error.
http://www.manpagez.com/man/3/fopen/
And print out the exect file path that you're trying to open, maybe there's something wrong with it.




Reply With Quote

Bookmarks