i know that this is how to open a file in C
FILE * pfile;
pfile = fopen("C:\\sample.txt", "r");
but what if i want to write a file and i dont want it to be written in a disk or folder, but still be able to read it? (only at runtime) ... maybe like in a memory ? i dont know
char x = "abcd";
pfile = fopen(temp, "w+");
something like that...my point is i dont want it to be written in a disk..only at runtime
if that is possible?
thanks in advance
Last edited on
You want a temporary file.
Topic archived. No new replies allowed.