CStdioFile类
来源:互联网 发布:淘宝店装修设计 编辑:程序博客网 时间:2024/06/03 00:05
参数内容: 第一个参数为路径+文件名,最后一个为错误出现的结构. 现在解释下第二个参数 CFile::modeCreate Directs the constructor to create a new file. If the file exists already, it is truncated to 0 length. 指定构造器创建一个新的文件,如果文件已经存在,则内容截0. CFile::modeNoTruncate Combine this value with modeCreate. If the file being created already exists, it is not truncated to 0 length. Thus the file is guaranteed to open, either as a newly created file or as an existing file. This might be useful, for example, when opening a settings file that may or may not exist already. This option applies to CStdioFile as well. modeNoTruncate 假如你不用这个参数的话,用modeCreate模式创建和打开一个文件,假如这个文件已经存在,则会清空这个已经存在的文件,加上modeNoTruncate的话,就不会清空这个文件了 CFile::modeRead Opens the file for reading only. 只是以读取方式打开 CFile::modeReadWrite Opens the file for reading and writing. 读与写同时 CFile::modeWrite Opens the file for writing only. CFile::modeNoInherit Prevents the file from being inherited by child processes. 阻止这个文件被子进程继承 CFile::shareDenyNone Opens the file without denying other processes read or write access to the file. Create fails if the file has been opened in compatibility mode by any other process. 打开这个文件同时允许其它进程读写这个文件。如果文件被其它进程以incompatibility模式打开,这是create操作会失败。 CFile::shareDenyRead Opens the file and denies other processes read access to the file. Create fails if the file has been opened in compatibility mode or for read access by any other process. 打开文件拒绝其它任何进程读这个文件。如果文件被其它进程用compatibility模式或者是读方式打开,create操作失败。 CFile::shareDenyWrite Opens the file and denies other processes write access to the file. Create fails if the file has been opened in compatibility mode or for write access by any other process. 打开文件拒绝其它任何进程写这个文件。如果文件被其它进程用compatibility模式或者是写方式打开,create操作失败。 CFile::shareExclusive Opens the file with exclusive mode, denying other processes both read and write access to the file. Construction fails if the file has been opened in any other mode for read or write access, even by the current process. 以独占方式打开这个文件,不允许其它进程读写这个文件。 CFile::shareCompat This flag is not available in 32 bit MFC. This flag maps to CFile::shareExclusive when used in CFile::Open. 这个标志在32位的MFC中无效。 CFile::typeText Sets text mode with special processing for carriage return–linefeed pairs (used in derived classes only). CFile::typeText 设置成对回车换行对有特殊处理的文本模式(仅用在派生类中)
只写
CFile::typeBinary 设置二进制模式(仅用在派生类中)
CStdioFile继承自CFile,一个CStdioFile 对象代表一个用运行时函数fopen 打开的C 运行时流文件。
- CStdioFile类
- CStdioFile类
- CStdioFile类
- CStdioFile类
- CStdioFile类
- CStdioFile类学习
- CStdioFile类学习笔记
- CStdioFile类学习笔记
- CStdioFile类学习笔记
- CStdioFile类学习
- MFC -- CStdioFile类
- CStdioFile类学习笔记
- Cstdiofile类详解
- CStdioFile
- CStdioFile
- CStdioFile
- CStdioFile
- CStdioFile
- Quake引擎十三年 历代作品回顾
- android 如何在JNI编程中使用logCat
- QUAKE系列引擎以及基于QUAKE扩展引擎的源代码分析
- 这些写法要注意
- 程序员需要具备的基本技能
- CStdioFile类
- android之Notification通知
- 缅怀Quake 3引擎
- pragma comment的使用
- C#编写的类库,实现将pdf转换成图片(jpg)
- GJB438B-2009附录S与DI-IPSC-81442的差异——GJB438B学习笔记之十
- 内存拷贝优化(1)-小内存拷贝优化
- 演练:创建和使用静态库
- 基础知识