std::basic_fstream
De cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Definido en la cabecera <fstream>
|
||
template< class CharT, |
||
La plantilla
basic_fstream
clase implementa alto nivel de entrada / salida en las operaciones de archivos basados en secuencias. Se conecta un streambuffer basada en archivos (std::basic_filebuf) con la interfaz de alto nivel de (std::basic_iostream) .Original:
The class template
basic_fstream
implements high-level input/output operations on file based streams. It interfaces a file-based streambuffer (std::basic_filebuf) with the high-level interface of (std::basic_iostream).The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Una implementación típica de
std::basic_fstream
tiene sólo una no-derivado de miembro de datos: una instancia de std::basic_filebuf<CharT, Traits> .Original:
A typical implementation of
std::basic_fstream
holds only one non-derived data member: an instance of std::basic_filebuf<CharT, Traits>.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Dos especializaciones para tipos de caracteres comunes también están definidos:
Original:
Two specializations for common character types are also defined:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Definido en la cabecera
<fstream> | |
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 |
fstream
|
basic_fstream<char> |
wfstream
|
basic_fstream<wchar_t> |
[editar] Tipos de miembros
Miembro de tipo
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
char_type
|
CharT |
traits_type
|
Traits |
int_type
|
Traits::int_type |
pos_type
|
Traits::pos_type |
off_type
|
Traits::off_type |
[editar] Las funciones miembro
construye la secuencia de archivo Original: constructs the 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 miembro público) | |
(destructor) [virtual] (implícitamente declarado) |
destructs the basic_fstream and the associated buffer, closes the file (función miembro público virtual) |
(C++11) |
mueve la secuencia de archivo Original: moves the 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 miembro público) |
(C++11) |
swaps de dos arroyos de archivos Original: swaps two file streams The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) |
devuelve el objeto subyacente prima de archivos del dispositivo Original: returns the underlying raw file device object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público) | |
Original: File operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Comprueba si el flujo tiene un archivo asociado Original: checks if the stream has an associated 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 miembro público) | |
abre un archivo y lo asocia con la corriente Original: opens a file and associates it with the 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 miembro público) | |
cierra el archivo asociado Original: closes the associated 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 miembro público) |
[editar] Terceros funciones
el algoritmo se especializa std::swap Original: specializes the std::swap algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (plantilla de función) |
Inherited from std::basic_istream
Member functions
Original: Formatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
extraer datos con formato (función miembro público de std::basic_istream )
| |
Original: Unformatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
extractos personajes Original: extracts characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_istream )
| |
lee el siguiente carácter sin extraerlo Original: reads the next character without extracting it The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_istream )
| |
unextracts un carácter Original: unextracts a character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_istream )
| |
pone personaje en la corriente de entrada Original: puts character into input 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 miembro público de std::basic_istream )
| |
extractos de caracteres hasta el carácter determinado se encuentra Original: extracts characters until the given character is found The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_istream )
| |
extractos y caracteres descartes hasta que el carácter dado se encuentra Original: extracts and discards characters until the given character is found The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_istream )
| |
extrae los bloques de caracteres Original: extracts blocks of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_istream )
| |
extrae los bloques que ya están disponibles los personajes Original: extracts already available blocks of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_istream )
| |
Devuelve el número de caracteres extraídos por última operación de entrada sin formato Original: returns number of characters extracted by last unformatted input operation The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_istream )
| |
Original: 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 posición de entrada Original: returns the input 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 miembro público de std::basic_istream )
| |
sets the input position indicator (función miembro público de std::basic_istream )
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
sincroniza con el dispositivo de almacenamiento subyacente Original: synchronizes with the underlying storage device The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_istream )
|
Member classes
implements basic logic for preparation of the stream for input operations (miembro de clase público de std::basic_istream )
|
Inherited from std::basic_ostream
Member functions
Original: Formatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
insertar datos con formato (función miembro público de std::basic_ostream )
| |
Original: Unformatted input The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
inserta un carácter Original: inserts a character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ostream )
| |
inserciones de bloques de caracteres Original: inserts blocks of characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ostream )
| |
Original: 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 posición de salida Original: returns the output 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 miembro público de std::basic_ostream )
| |
establece el indicador de posición de salida Original: sets the output 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 miembro público de std::basic_ostream )
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
sincroniza con el dispositivo de almacenamiento subyacente Original: synchronizes with the underlying storage device The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ostream )
|
Member classes
implementa lógica básica para la preparación de la corriente para operaciones de salida Original: implements basic logic for preparation of the stream for output operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro de clase público de std::basic_ostream )
|
Inherited from std::basic_ios
Member types
Miembro de tipo
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
char_type
|
CharT |
traits_type
|
Traits |
int_type
|
Traits::int_type |
pos_type
|
Traits::pos_type |
off_type
|
Traits::off_type |
Original: State functions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
comprueba si se ha producido ningún error es decir, operaciones de E / están disponibles Original: checks if no error has occurred i.e. I/O operations are available The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ios )
| |
comprueba si al final de su archivo ha sido alcanzado Original: checks if end-of-file has been reached The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ios )
| |
Comprueba si un error recuperable se ha producido Original: checks if a recoverable error has occurred The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ios )
| |
Comprueba si un error irrecuperable ha ocurrido Original: checks if a non-recoverable error has occurred The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ios )
| |
comprueba si ha ocurrido un error (sinónimo de fail()) Original: checks if an error has occurred (synonym of fail()) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ios )
| |
(hasta C++11)(desde C++11) |
comprueba si se ha producido ningún error (sinónimo de !fail()) Original: checks if no error has occurred (synonym of !fail()) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ios )
|
devuelve las banderas estatales Original: returns state flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ios )
| |
establece indicadores de estado Original: sets state flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ios )
| |
despeja indicadores de error y eof Original: clears error and eof flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ios )
| |
Original: Formatting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
copias la información de formato Original: copies formatting information The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ios )
| |
administra el carácter de relleno Original: manages the fill character The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ios )
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
manages exception mask (función miembro público de std::basic_ios )
| |
establece la configuración regional Original: sets the locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ios )
| |
gestiona buffer asociado arroyo Original: manages associated stream 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 miembro público de std::basic_ios )
| |
gestiona corriente atadas Original: manages tied 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 miembro público de std::basic_ios )
| |
estrecha caracteres Original: narrows characters The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::basic_ios )
| |
widens characters (función miembro público de std::basic_ios )
|
Inherited from std::ios_base
Member functions
Original: Formatting The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
gestiona las banderas de formato Original: manages format flags The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::ios_base )
| |
establece el marcador formato específico Original: sets specific format flag The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::ios_base )
| |
clears specific format flag (función miembro público de std::ios_base )
| |
gestiona precisión decimal de operaciones de punto flotante Original: manages decimal precision of floating point operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::ios_base )
| |
manages field width (función miembro público de std::ios_base )
| |
Original: Locales The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
establece la configuración regional Original: sets locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::ios_base )
| |
devuelve localización actual Original: returns current locale The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::ios_base )
| |
Original: Internal extensible array The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
[estático] |
devuelve un entero único para todo el programa que es seguro de usar como índice para pword () y iword () Original: returns a program-wide unique integer that is safe to use as index to pword() and iword() The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público estático de std::ios_base )
|
cambia el tamaño del almacenamiento privado si es necesario y el acceso a la long elemento en el índice especificado Original: resizes the private storage if necessary and access to the long element at the given index The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::ios_base )
| |
cambia el tamaño del almacenamiento privado si es necesario y el acceso a la void* elemento en el índice especificado Original: resizes the private storage if necessary and access to the void* element at the given index The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público de std::ios_base )
| |
Original: Miscellaneous The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
registers event callback function (función miembro público de std::ios_base )
| |
[estático] |
Establece si C + + y C IO Libraries son interoperables Original: sets whether C++ and C IO libraries are interoperable The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (función miembro público estático de std::ios_base )
|
Original: Member classes The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
corriente excepción Original: stream exception The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro de clase público de std::ios_base )
| |
inicializa los objetos estándar de la corriente Original: initializes standard stream objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (miembro de clase público de std::ios_base )
|
Original: Member types and constants The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. |
Explanation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
corriente Tipo de modo de apertura
Las siguientes constantes se definen también:
Original: stream open mode type
The following constants are also defined:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
banderas de formato tipo
Las siguientes constantes se definen también:
Original: formatting flags type
The following constants are also defined:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
estado del tipo de flujo
Las siguientes constantes se definen también:
Original: state of the stream type
The following constants are also defined:
The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
seeking direction type
The following constants are also defined:
(typedef) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
especifica el tipo de evento Original: specifies event type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (enum) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
callback tipo de función Original: callback function type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) |