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. |
Déclaré dans l'en-tête <fstream>
|
||
template< class CharT, |
||
Le modèle
basic_fstream
classe implémente haut niveau d'entrée / sortie sur les opérations de fichiers basés sur les flux. Il s'interface un streambuffer basé sur des fichiers (std::basic_filebuf) avec l'interface de haut niveau (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.
Une implémentation typique de
std::basic_fstream
ne contient qu'un seul non-membre de données dérivées: une instance 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.
Deux spécialisations pour les types de caractères communs sont également définis:
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.
Defined in header
<fstream> | |
Type d'
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> |
[modifier] Types de membres
Type du membre | Définition |
char_type
|
CharT |
traits_type
|
Traits |
int_type
|
Traits::int_type |
pos_type
|
Traits::pos_type |
off_type
|
Traits::off_type |
[modifier] Fonctions membres
construit le flux de fichier 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. (fonction membre publique) | |
(destructor) [ virtuel ] (implicitement déclaré)Original: virtual The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
destructs the basic_fstream and the associated buffer, closes the file (function membre virtuelle publique) |
(C++11) |
déplace le fichier stream 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. (fonction membre publique) |
(C++11) |
swaps de deux flux de fichiers 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. (fonction membre publique) |
retourne le sous-jacent objet brut de fichier de périphérique 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. (fonction membre publique) | |
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. | |
vérifie si le flux a un fichier associé 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. (fonction membre publique) | |
ouvre un fichier et l'associe avec le flux 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. (fonction membre publique) | |
ferme le fichier associé 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. (fonction membre publique) |
[modifier] Fonctions annexes
(C++11) |
l'algorithme spécialisé 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. (fonction générique) |
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. | |
extraits des données formatées Original: extracts formatted data The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique 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. | |
extraits caractères 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. (fonction membre publique de std::basic_istream )
| |
lit le caractère suivant sans l'extraire 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. (fonction membre publique de std::basic_istream )
| |
unextracts un caractère 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. (fonction membre publique de std::basic_istream )
| |
met caractère dans le flux d'entrée 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. (fonction membre publique de std::basic_istream )
| |
caractères extraits jusqu'à ce que le caractère donné se trouve 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. (fonction membre publique de std::basic_istream )
| |
extraits et rejets des caractères jusqu'à ce que le caractère donné soit trouvé 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. (fonction membre publique de std::basic_istream )
| |
extrait des blocs de caractères 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. (fonction membre publique de std::basic_istream )
| |
extrait des blocs déjà disponibles de caractères 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. (fonction membre publique de std::basic_istream )
| |
Retourne le nombre de caractères extraits par l'opération dernière entrée non formaté 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. (fonction membre publique 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. | |
renvoie l'indicateur de position d'entrée 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. (fonction membre publique de std::basic_istream )
| |
sets the input position indicator (fonction membre publique 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. | |
synchronise avec le dispositif de stockage sous-jacent 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. (fonction membre publique de std::basic_istream )
|
Member classes
met en oeuvre la logique de base pour la préparation du courant pour des opérations d'entrée Original: implements basic logic for preparation of the stream for input operations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe membre publique 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. | |
inserts en forme des données Original: inserts formatted data The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique 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. | |
insère un caractère 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. (fonction membre publique de std::basic_ostream )
| |
blocs inserts de caractères 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. (fonction membre publique 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. | |
renvoie l'indicateur de position de sortie 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. (fonction membre publique de std::basic_ostream )
| |
définit l'indicateur de position de sortie 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. (fonction membre publique 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. | |
synchronise avec le dispositif de stockage sous-jacent 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. (fonction membre publique de std::basic_ostream )
|
Member classes
met en oeuvre la logique de base pour la préparation du courant pour des opérations de sortie 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. (classe membre publique de std::basic_ostream )
|
Inherited from std::basic_ios
Member types
Type du membre | Définition |
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. | |
vérifie si aucune erreur n'est survenue dire opérations E / S sont 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. (fonction membre publique de std::basic_ios )
| |
vérifie si fin de fichier a été atteinte 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. (fonction membre publique de std::basic_ios )
| |
vérifie si une erreur irrécupérable s'est produite 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. (fonction membre publique de std::basic_ios )
| |
vérifie si une erreur irrécupérable s'est produite 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. (fonction membre publique de std::basic_ios )
| |
vérifie si une erreur s'est produite (synonyme 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. (fonction membre publique de std::basic_ios )
| |
(avant C++11) (depuis C++11) |
vérifie si aucune erreur ne s'est produite (synonyme 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. (fonction membre publique de std::basic_ios )
|
retourne drapeaux nationaux 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. (fonction membre publique de std::basic_ios )
| |
définit des indicateurs d'état 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. (fonction membre publique de std::basic_ios )
| |
efface les indicateurs d'erreur et 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. (fonction membre publique 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. | |
copies de formater l'information 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. (fonction membre publique de std::basic_ios )
| |
gère le caractère de remplissage 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. (fonction membre publique 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. | |
gère masque d'exception Original: manages exception mask The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::basic_ios )
| |
définit les paramètres régionaux 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. (fonction membre publique de std::basic_ios )
| |
gère tampon de flux associé 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. (fonction membre publique de std::basic_ios )
| |
gère flux liés 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. (fonction membre publique de std::basic_ios )
| |
rétrécit caractères 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. (fonction membre publique de std::basic_ios )
| |
widens characters (fonction membre publique 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. | |
gère indicateurs de format 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. (fonction membre publique de std::ios_base )
| |
active l'indicateur de format spécifique 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. (fonction membre publique de std::ios_base )
| |
clears specific format flag (fonction membre publique de std::ios_base )
| |
gère précision décimale des opérations en virgule flottante 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. (fonction membre publique de std::ios_base )
| |
manages field width (fonction membre publique 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. | |
fixe locale 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. (fonction membre publique de std::ios_base )
| |
retourne localisation en cours 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. (fonction membre publique 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. | |
[ statique ]Original: static The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
renvoie un entier ensemble du programme unique qui est sûr à utiliser comme indice de motpasse () et 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. (fonction membre publique statique de std::ios_base )
|
redimensionne le stockage privé et le cas échéant un accès à l'élément de long à l'index donné 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. (fonction membre publique de std::ios_base )
| |
redimensionne le stockage privé et le cas échéant un accès à l'élément de void* à l'index donné 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. (fonction membre publique 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. | |
enregistre fonction de rappel d'événement Original: registers event callback function The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction membre publique de std::ios_base )
| |
[ statique ]Original: static The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
définit si le C + + et C des bibliothèques d'entrées-sorties sont interopérables 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. (fonction membre publique statique 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. | |
exception ruisseau 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. (classe membre publique de std::ios_base )
| |
initialise les objets de flux standard 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. (classe membre publique 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. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Type d'
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
type de mode de flux ouvert
Les constantes suivantes sont également définis:
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) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
la mise en forme des drapeaux de type
Les constantes suivantes sont également définis:
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) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
état du type de flux
Les constantes suivantes sont également définis:
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) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cherchant type de direction
Les constantes suivantes sont également définis:
Original: seeking direction 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) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
spécifie le type d'événement 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 type de fonction 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) |