1. fopen
FILE * fopen (const char * path,const char * mode); function Description
The parameter path string contains the file path and filename you want to open, and the parameter mode string represents the flow pattern.
Mode has the following
fseek function:
int fseek (FILE * _file, long _offset, int _origin);
function to set the location of the file pointer stream. If the execution succeeds, the stream points to the position of Fromwhere as the offset (pointer offset)
"C Program Design" Reading notes
Keywords: C languageOriginal author name: Loose_wentThe original source of the article: vczx.com---http://www.vczx.com/minute_c.php
Written in front:
"C Program Design" can be said to be a foundation of the
In the programming process, file operations are a common problem. In C ++ Builder, you can use multiple methods to operate files, I will introduce this in detail in the following parts:
1. C-based file operations;
2. File Operations Based on C ++
In the programming process, file operations are a common problem. In C ++ builder, you can use multiple methods to operate files, I will introduce this in detail in the following parts:
1. C-based file operations;
2. File Operations Based on C ++;
1
C file operations
FileBasic concepts of FilesThe so-called "file" refers to an ordered set of related data. This dataset has a name called a file name. In fact, we have used files many times in the
C-based file operationsIn ANSI C, the operation of the file is divided into two ways, that is, streaming file operations and I/O file operations, respectively, described below.One, streaming file operationThe file operations in this way have an
C-based file operations
In ANSI C, the operation of the file is divided into two ways, that is, streaming file operations and I/O file operations, respectively, described below.
One, streaming file operation
The file operations in this way have an
13.1c language file 1. Two file access methods (input and output)Sequential accessDirect Access2. Two data storage formatsText FilesBinary files 13.2 file pointer The general format of defining file type pointer variables:File * pointer variable
C-based file operationsIn ansi c, file operations are divided into two methods:Stream File OperationsAndI/O File Operations.
I. Stream File OperationsThis method has an important structure for file operations.FileFile is defined in the header file
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.