I’ve been vague about the value of the filename parameter to date in the discussion of files. No matter the operating system being written for, there are always two kinds of filenames that can be used to open a file. The first kind is just a simple name, as in:
FILE * hFile = fopen ( "Myfile.txt", "r" );
Here, the file Myfile.txt is assumed to be located in the same directory folder as the application that tries to access it. If not, the operating system may try to search for the file along the standard paths associated with the user’s application; if the file is to be created, it will be created in the same directory folder as the application.
You can also access other locations by specifying a fully qualified filename—one ...