Closing Files
As usual in I/O operations, once you finish with a file, you must close it.
To close a file
- Use the Close member function. This function closes the file-system file and flushes buffers if necessary.
If you allocated the CFile object on the frame (as in the example shown in Opening Files), the object will automatically be closed and then destroyed when it goes out of scope. Note that deleting the CFile
object does not delete the physical file in the file system.
See also
คำติชม
https://aka.ms/ContentUserFeedback
เร็วๆ นี้: ตลอดปี 2024 เราจะขจัดปัญหา GitHub เพื่อเป็นกลไกคำติชมสำหรับเนื้อหา และแทนที่ด้วยระบบคำติชมใหม่ สำหรับข้อมูลเพิ่มเติม ให้ดู:ส่งและดูข้อคิดเห็นสำหรับ