File input/output

来自cppreference.com
< c

 
 
File input/output
功能
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
文件访问
Original:
File access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
直接输入/输出
Original:
Direct input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
fread
fwrite
未格式化的输入/输出
Original:
Unformatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
格式化输入/输出
Original:
Formatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
文件定位
Original:
File positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ftell
fgetpos
fseek
fsetpos
rewind
错误处理
Original:
Error handling
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
clearerr
feof
ferror
perror
对文件的操作
Original:
Operations on files
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
remove
rename
tmpfile
tmpnam
 
<stdio.h>头提供了通用的文件操作的支持和供应功能与窄字符输入/输出功能.
Original:
The <stdio.h> header provides generic file operation support and supplies functions with narrow character input/output capabilities.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
<wchar.h>头提供的功能与宽字符输入/输出功能.
Original:
The <wchar.h> header supplies functions with wide character input/output capabilities.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

目录

[编辑] 功能

文件访问
Original:
File access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
打开一个文件
Original:
opens a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
打开一个现有的流用不同的名称
Original:
open an existing stream with a different name
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
关闭一个文件
Original:
closes a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
实际的文件同步输出流
Original:
synchronizes an output stream with the actual file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
宽字符I / O和窄字符之间切换文件流I / O
Original:
switches a file stream between wide character I/O and narrow character I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
设置文件流的缓冲区
Original:
sets the buffer for a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
设置文件流的缓冲区,其大小
Original:
sets the buffer and its size for a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
直接输入/输出
Original:
Direct input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
从文件读取
Original:
reads from a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
写入到一个文件中
Original:
writes to a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
未格式化的输入/输出
Original:
Unformatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
窄字符
Original:
Narrow character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
从文件流中获取一个字符
Original:
gets a character from a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
得到一个字符串从一个文件流
Original:
gets a character string from a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
将一个字符写入一个文件流
Original:
writes a character to a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
将一个字符串写入一个文件流
Original:
writes a character string to a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
stdin中读取一个字符
Original:
reads a character from stdin
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
stdin读取一个字符的字符串
Original:
reads a character string from stdin
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
将一个字符写入stdout
Original:
writes a character to stdout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
写一个字符串stdout
Original:
writes a character string to stdout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
把一个字符到一个文件流
Original:
puts a character back into a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
宽字符
Original:
Wide character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
得到一个宽字符的文件流
Original:
gets a wide character from a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
获取宽字符串从文件流
Original:
gets a wide string from a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
一个宽字符写入一个文件流
Original:
writes a wide character to a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
宽字符串写入一个文件流
Original:
writes a wide string to a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
读取一个字符stdin
Original:
reads a wide character from stdin
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
写一个宽字符stdout
Original:
writes a wide character to stdout
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
把一个宽字符到一个文件流
Original:
puts a wide character back into a file stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
格式化输入/输出
Original:
Formatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
窄字符
Original:
Narrow character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
stdin,文件流或缓冲区的读取格式的输入
Original:
reads formatted input from stdin, a file stream or a buffer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C99)
(C99)
(C99)
stdin,一个文件流或buffer
使用可变参数列表的读取格式的输入
Original:
reads formatted input from stdin, a file stream or a buffer
using variable argument list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
打印格式化输出到stdout,文件流或缓冲区
Original:
prints formatted output to stdout, a file stream or a buffer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
打印格式化的输出stdout,一个文件流或buffer
使用可变参数列表
Original:
prints formatted output to stdout, a file stream or a buffer
using variable argument list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
宽字符
Original:
Wide character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
stdin,文件流或缓冲区读取格式的宽字符输入
Original:
reads formatted wide character input from stdin, a file stream or a buffer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
(C99)
(C99)
(C99)
stdin,的文件stream
或使用可变参数列表的缓冲区读取格式的宽字符输入
Original:
reads formatted wide character input from stdin, a file stream
or a buffer using variable argument list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
打印格式化宽字符输出到stdout,文件流或缓冲区
Original:
prints formatted wide character output to stdout, a file stream or a buffer
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
打印格式化宽字符输出到stdout,的文件stream
或使用可变参数列表的缓冲区
Original:
prints formatted wide character output to stdout, a file stream
or a buffer using variable argument list
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
文件定位
Original:
File positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
返回当前的文件指针位置
Original:
returns the current file position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
获取文件位置指示器
Original:
gets the file position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
在一个文件中的文件位置指示符移动到特定的位置
Original:
moves the file position indicator to a specific location in a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
在一个文件中的文件位置指示符移动到特定的位置
Original:
moves the file position indicator to a specific location in a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
移动的文件,在一个文件中的开始位置指示器
Original:
moves the file position indicator to the beginning in a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
错误处理
Original:
Error handling
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
清除错误
Original:
clears errors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
检查文件结束
Original:
checks for the end-of-file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
检查文件错误
Original:
checks for a file error
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
显示一个字符串相应的电流误差stderr
Original:
displays a character string corresponding of the current error to stderr
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
对文件的操作
Original:
Operations on files
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
删除一个文件
Original:
erases a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
重命名文件
Original:
renames a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
返回一个指针到一个临时文件中
Original:
returns a pointer to a temporary file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]
返回一个唯一的文件名
Original:
returns a unique filename
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(函数) [edit]

[编辑] 类型

Defined in header <stdio.h>
类型
Original:
Type
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definition
FILE
类型,能够保持一个CI / O流控制所需的所有信息
Original:
type, capable of holding all information needed to control a C I/O stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
fpos_t
的类型,能够唯一地指定在一个文件中的位置
Original:
type, capable of uniquely specifying a position in a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[编辑]

Defined in header <stdio.h>
stdin
stdout
stderr
表达型FILE *的类型FILE *类型为FILE *的输出stream
expression的错误输出流与的输入stream
expression的
Original:
expression of type FILE* associated with the input stream
expression of type FILE* associated with the output stream
expression of type FILE* associated with the error output stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(宏不变)
EOF
整型常量表达式的类型int和负价值
Original:
integer constant expression of type int and negative value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(宏不变)
FOPEN_MAX
可以同时打开的文件数
Original:
number of files that can be open simultaneously
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(宏不变)
FILENAME_MAX
大小需要的为char数组以保存最长的支持文件名
Original:
size needed for an array of char to hold the longest supported file name
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(宏不变)
BUFSIZ
函数setbuf()所使用的缓冲区的大小
Original:
size of the buffer used by setbuf()
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(宏不变)
_IOFBF
_IOLBF
_IONBF
函数setvbuf()的参数,表示完全缓冲I /O
argument函数setvbuf()指示线缓冲I /O
argument的函数setvbuf()表示非缓冲I / O
Original:
argument to setvbuf() indicating fully buffered I/O
argument to setvbuf() indicating line buffered I/O
argument to setvbuf() indicating unbuffered I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(宏不变)
SEEK_SET
SEEK_CUR
SEEK_END
参数,FSEEK()指示寻找从开始file
argumentFSEEK()表示寻求从文件末尾寻求从目前的的文件position
argument到FSEEK()的
Original:
argument to fseek() indicating seeking from beginning of the file
argument to fseek() indicating seeking from the current file position
argument to fseek() indicating seeking from end of the file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(宏不变)
TMP_MAX
使用tmpnam()生成的唯一的文件名,可以最大数目
Original:
maximum number of unique filenames that can be generated by tmpnam()
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(宏不变)
L_tmpnam
需要的大小为char数组来保存结果的使用tmpnam()
Original:
size needed for an array of char to hold the result of tmpnam()
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(宏不变)