Page 1 of 1

tmpfile() always returns NULL

Posted: Wed Mar 02, 2011 3:04 pm
by EvilTroopa
Hi !
I'm trying to create a temporary file that I can read using fread.
The purpose of it is I already have functions to read certain types of files and now that I've packed them in one big file, I don't really want to make new functions to parse some char*.
Yeah call me lazy. :?

So I figured a good way would be to create a temp file, then send the stream pointer to my function. But tmpfile() always returns NULL, I can't write in it.

Has it been implemented ? Or is there anything special to do to make my stream available ?

Thanks !