【お知らせ】この部分は英語原文のみでの提供となります。何卒ご了承ください。
2.2.5.1.1 file::Close
Contents
Description
Close the file associated with the indicated file object.
Syntax
BOOL Close( )
Parameters
Return
A value of FALSE or 0 indicates fail to close file and a value of TRUE or a
non-zero indicates sucessfully closing file.
Examples
EX1
void file_Close_ex1() { char szTemp[MAXFULLPATH] = "C:\\test.txt"; string strFile = szTemp; file ff; if( ff.Open(szTemp, file::modeCreate | file::modeWrite) ) { ff.Write(szTemp, strFile.GetLength()); // Write the file name into the file. ff.Close(); // Close the file when we are done. } }
Remark
Closes the file associated with the indicated file object. The file is then no longer available for reading and writing.
See Also
Header to Include
origin.h