How to wait for file closing?
- Posted by SnakeCharmer Dec 10, 2012
- 1814 views
I have C++ code, that writes some strings to file. For example:
FILE *file = fopen("yum-yum.lst", "w");
fputs("Hot Fudge Sundae\n", file);
fputs("Muffin\n", file);
fputs("Hash Browns With Maple Syrup\n");
fclose(file);
I need to open and read (but not write) this file by my Euphoria program. How to be convinced of what the file is already closed? Otherwise it can be read not completely. I have no ideas, except adding keyword to end of file. For example, "END". But it isn't so effective because it is necessary to read all file to be convinced that it is full. Maybe, it is superfluous because Euphoria won't open file during writing?