Opening Files
You can use the fopen( ) function to create a new file or to open an existing file. This call will initialize an object of the type FILE, which contains all the information necessary to control the stream.
Ex : FILE *f = fopen("data.txt","r");
#NB : r = read file
w = write file
a = append file
Closing a File
You can use the fclose() function to close an existing file
Ex : fclose(read), fclose(f)
Tidak ada komentar:
Posting Komentar