在C语言中用一个指针变量指向一个文件,这个指针称为文件指针。通过文件指针就可对它所指的文件进行各种操作。
还有一点需要知道的是使用fopen()函数打开的文件会先将文件复制到缓冲区。文件指针(file pointer)指向一个FILE结构体,该结构体定义在头文件 stdio.h 中,该结构体中包括了文件I/O使用的缓冲区信息和其他信息(感兴趣的可以查看...
基于612个网页-相关网页
关闭进程文件指针 pclose
从文件指针中读取字符 fgetc
从文件指针中读取一行 fgets
倒回文件指针的位置 rewind
文件指针归零 frewind
返回的文件指针 File Identifier
取文件指针 fgetpos ; ftell
首先,把mydata list的内容写入文件,然后把文件指针重新定位到文件开头,并读入内容。
First you write the contents of the mydata list to the file, then you reposition the file pointer to the start of the file and read the contents.
在这段代码中,您首先要为标准输入声明一个文件指针,以便您能够在拼写检查过程中从键盘获得交互式信息。
In this code, you start by declaring a file pointer to standard input so that you can get interactive information from the keyboard during the spell-check process.
无法在指定的设备或文件上设置文件指针。
The file pointer cannot be set on the specified device or file.
应用推荐