Espacios de nombres
Variantes
Acciones

C-style file input/output

De cppreference.com
< cpp‎ | io


 
 
Entrada / salida de la biblioteca
I / O manipuladores
C-estilo I / O
Buffers
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf(obsoleto)
Arroyos
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstracciones
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
File I / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
Cadena de I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
Matriz I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream(obsoleto)
ostrstream(obsoleto)
strstream(obsoleto)
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Error interfaz categoría
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category(C++11)
io_errc(C++11)
 
C-estilo I / O
Funciones
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Acceso a archivos
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.
Directo de entrada / salida
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
Entrada sin formato / salida
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.
Formato de entrada / salida
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.
Presentar posicionamiento
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
Gestión de errores
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
Las operaciones en los archivos
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
 
El subconjunto CI / S del C + + biblioteca estándar C-estilo implementa flujo de entrada / salida de las operaciones. La cabecera <cstdio> proporciona apoyo genérico operación de archivo y las funciones de los suministros estrechos y con carácter multibyte de entrada / salida de capacidades, y la cabecera <cwchar> proporciona funciones de entrada de caracteres de ancho / capacidades de salida .
Original:
The C I/O subset of the C++ standard library implements C-style stream input/output operations. The <cstdio> header provides generic file operation support and supplies functions with narrow and multibyte character input/output capabilities, and the <cwchar> header provides 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.
Flujos de C son objetos de tipo std::FILE que sólo se puede acceder y manipular a través de punteros de tipo std::FILE* (Nota: aunque puede ser posible crear un objeto local de std::FILE tipo de eliminación de referencias y copiar un FILE* válido, utilizando la dirección de dicha copia en las funciones de E / S es un comportamiento no definido). Cada corriente de C está asociada con un dispositivo externo físico (archivo, secuencia de entrada estándar, una impresora, un puerto serie, etc) .
Original:
C streams are objects of type std::FILE that can only be accessed and manipulated through pointers of type std::FILE* (Note: while it may be possible to create a local object of type std::FILE by dereferencing and copying a valid FILE*, using the address of such copy in the I/O functions is undefined behavior). Each C stream is associated with an external physical device (file, standard input stream, printer, serial port, etc).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Corrientes de C se pueden utilizar tanto para la entrada sin formato y formateado y de salida. Son sensible a la localidad y pueden realizar todo / multibyte conversiones según sea necesario. A diferencia de C + + arroyos, donde se asocia cada corriente con local propio, todos los flujos de C acceso al objeto mismo lugar: la más reciente instalado con std::setlocale .
Original:
C streams can be used for both unformatted and formatted input and output. They are locale-sensitive and may perform wide/multibyte conversions as necessary. Unlike C++ streams, where each stream is associated with its own locale, all C streams access the same locale object: the one most recently installed with std::setlocale.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Además de la información específica del sistema necesario para acceder al dispositivo (por ejemplo, un descriptor de archivo POSIX), cada objeto de secuencia C contiene lo siguiente:
Original:
Besides the system-specific information necessary to access the device (e.g. a POSIX file descriptor), each C stream object holds the following:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Anchura de caracteres: estrecho o ancho
Original:
Character width: narrow or wide
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Buffering estado: sin búfer, la línea de búfer, con búfer completo .
Original:
Buffering state: unbuffered, line-buffered, fully buffered.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
El tampón, el cual puede ser sustituido por un externo, proporcionado por el usuario tampón .
Original:
The buffer, which may be replaced by an external, user-provided buffer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
Modo I / O: entrada, salida o actualización (tanto de entrada como de salida) .
Original:
I/O mode: input, output, or update (both input and output).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
Binary / indicador de modo de texto .
Original:
Binary/text mode indicator.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
6)
End-of-file indicador de estado .
Original:
End-of-file status indicator.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
7)
Error indicador de estado .
Original:
Error status indicator.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
8)
El archivo indicador de posición (un objeto de tipo std::fpos_t), que, para flujos de caracteres de ancho, incluye el estado de análisis (un objeto de tipo mbstate_t) .
Original:
File position indicator (an object of type std::fpos_t), which, for wide character streams, includes the parse state (an object of type mbstate_t).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Funciones

Acceso a archivos
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.
se abre un archivo
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.

(función) [edit]
abrir una secuencia existente con un nombre diferente
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.

(función) [edit]
cierra un archivo
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.

(función) [edit]
sincroniza un flujo de salida con el archivo real
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.

(función) [edit]
cambia una secuencia de archivos entre el carácter amplio de E / S y el carácter limitado de 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.

(función) [edit]
establece el tampón para una secuencia de archivo
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.

(función) [edit]
establece el tampón y su tamaño para una secuencia de archivo
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.

(función) [edit]
Directo de entrada / salida
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.
lee un archivo
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.

(función) [edit]
escribe en un archivo
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.

(función) [edit]
Entrada sin formato / salida
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.
Carácter estrecho
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.
recibe un carácter de una secuencia de archivo
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.

(función) [edit]
recibe una cadena de caracteres a partir de una secuencia de archivo
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.

(función) [edit]
Escribe un carácter en una secuencia de archivo
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.

(función) [edit]
escribe una cadena de caracteres en una secuencia de archivo
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.

(función) [edit]
dice un personaje de 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.

(función) [edit]
lee una cadena de caracteres de 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.

(función) [edit]
escribe un carácter a 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.

(función) [edit]
escribe una cadena de caracteres a 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.

(función) [edit]
pone un personaje nuevo en una secuencia de archivo
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.

(función) [edit]
Carácter amplio
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.
recibe un carácter ancho de una secuencia de archivo
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.

(función) [edit]
obtiene una cadena amplia de una secuencia de archivo
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.

(función) [edit]
escribe un carácter ancho a un secuencia de archivo
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.

(función) [edit]
escribe una cadena ancha para una secuencia de archivo
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.

(función) [edit]
lee un carácter ancho de 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.

(función) [edit]
escribe un carácter ancho a 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.

(función) [edit]
pone un carácter ancho de nuevo en una secuencia de archivo
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.

(función) [edit]
Formato de entrada / salida
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.
Estrecho / de caracteres multibyte
Original:
Narrow/multibyte character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
lee la entrada con formato desde stdin, una secuencia de archivo o un tampón
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.

(función) [edit]
(C++11)
(C++11)
(C++11)
lee la entrada con formato de stdin, una secuencia de archivo o una buffer
con lista de argumentos variable
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.

(función) [edit]
imprime la salida formateada para stdout, una secuencia de archivo o un tampón
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.

(función) [edit]
imprime el formato de salida a stdout, una secuencia de archivo o una buffer
con lista de argumentos variable
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.

(función) [edit]
Carácter amplio
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.
lee la entrada formateado carácter ancho de stdin, una secuencia de archivo o un tampón
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.

(función) [edit]
(C++11)
(C++11)
(C++11)
lee la entrada con formato de caracteres anchos de stdin, un stream
archivo o un buffer usando la lista de argumentos variable
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.

(función) [edit]
imprime la salida formateada carácter ancho a stdout, una secuencia de archivo o un tampón
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.

(función) [edit]
imprime el formato de salida de caracteres anchos a stdout, un stream
archivo o un buffer usando la lista de argumentos variable
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.

(función) [edit]
Presentar posicionamiento
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.
devuelve el indicador de archivo posición actual
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.

(función) [edit]
obtiene el indicador de posición del archivo
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.

(función) [edit]
desplaza el indicador de posición de archivo a una ubicación específica en un archivo
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.

(función) [edit]
desplaza el indicador de posición de archivo a una ubicación específica en un archivo
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.

(función) [edit]
mueve el indicador de posición de archivo al principio en un archivo
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.

(función) [edit]
Gestión de errores
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.
borra los errores
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.

(función) [edit]
cheques para el final de archivo
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.

(función) [edit]
comprueba si hay un error de archivo
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.

(función) [edit]
muestra una cadena de caracteres correspondiente del error actual a 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.

(función) [edit]
Las operaciones en los archivos
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.
borra un archivo
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.

(función) [edit]
cambia el nombre de un archivo
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.

(función) [edit]
crea y abre un temporal, auto-eliminación de archivos
Original:
creates and opens a temporary, auto-removing file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [edit]
devuelve un nombre de archivo único
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.

(función) [edit]

[editar] Tipos

Defined in header <cstdio>
Tipo
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
tipo, capaz de contener toda la información necesaria para controlar una corriente 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
tipo, capaz de especificar una posición única en un archivo
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.

[editar] Macros

Defined in header <cstdio>
stdin
stdout
stderr
expresión de tipo FILE* asociado con la entrada de stream
expression FILE* tipo asociado con la salida de stream
expression FILE* tipo asociado con la corriente de salida de error
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.

(macro constante)
EOF
expresión constante entera de int tipo y valor negativo
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.

(macro constante)
FOPEN_MAX
número de archivos que pueden estar abiertos al mismo tiempo
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.

(macro constante)
FILENAME_MAX
el tamaño necesario para una matriz de char a mantener más tiempo el nombre de archivo compatible
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.

(macro constante)
BUFSIZ
tamaño del búfer utilizado por std::setbuf
Original:
size of the buffer used by std::setbuf
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(macro constante)
_IOFBF
_IOLBF
_IONBF
argumento para std::setbuf indicando búfer completo de E / O
argument a la línea que indica std::setbuf búfer de E / O
argument a std::setbuf indicando unbuffered I / O
Original:
argument to std::setbuf indicating fully buffered I/O
argument to std::setbuf indicating line buffered I/O
argument to std::setbuf 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.

(macro constante)
SEEK_SET
SEEK_CUR
SEEK_END
argumento a std::fseek indicando busca de comienzo de la file
argument a std::fseek indicando busca desde el position
argument archivo actual a std::fseek indicando busca de final del archivo
Original:
argument to std::fseek indicating seeking from beginning of the file
argument to std::fseek indicating seeking from the current file position
argument to std::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.

(macro constante)
TMP_MAX
número máximo de nombres de archivos únicos que pueden ser generados por std::tmpnam
Original:
maximum number of unique filenames that can be generated by std::tmpnam
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(macro constante)
L_tmpnam
el tamaño necesario para una matriz de char para guardar el resultado de std::tmpnam
Original:
size needed for an array of char to hold the result of std::tmpnam
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(macro constante)