Espaces de noms
Variantes
Affichages
Actions

std::clog, std::wclog

De cppreference.com
< cpp‎ | io

 
 
D'entrée / sortie de bibliothèque
I / O manipulateurs
C-style I / O
Tampons
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 (obsolète)
Cours d'eau
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstractions
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
Fichier E / 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
Chaîne 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
Tableau 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 (obsolète)
ostrstream (obsolète)
strstream (obsolète)
Types
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
Interface catégorie d'erreur
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)
 
std::basic_ostream
Les objets globaux
Original:
Global objects
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
clog
wclog
Les fonctions membres
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ostream::basic_ostream
basic_ostream::~basic_ostream
basic_ostream::operator= (C++11)
Entrée formaté
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.
basic_ostream::operator<<
Entrée non formaté
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.
basic_ostream::put
basic_ostream::write
Positionnement
Original:
Positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ostream::tellp
basic_ostream::seekp
Divers
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ostream::flush
basic_ostream::swap (C++11)
Classes de membres
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.
basic_ostream::sentry
Tiers fonctions
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
operator<<(std::basic_ostream)
 
Defined in header <iostream>
extern std::ostream clog;
(1)
extern std::wostream wclog;
(2)
Les objets globaux std::clog et de sortie de commande std::wclog à une mémoire tampon de flux de type défini par l'application (extraite de std::streambuf), associée à la norme C stderr flux de sortie, mais, à la différence std::cerr / std::wcerr, ces flux sont automatiquement supprimées et ne pas lier automatiquement ( ) 'd avec cout .
Original:
The global objects std::clog and std::wclog control output to a stream buffer of implementation-defined type (derived from std::streambuf), associated with the standard C output stream stderr, but, unlike std::cerr/std::wcerr, these streams are not automatically flushed and not automatically tie()'d with cout.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Ces objets sont garantis d'être construits avant le premier constructeur d'un objet statique est appelé et ils sont garantis pour survivre à la dernière destructeur d'un objet statique, de sorte qu'il est toujours possible d'écrire à std::clog dans le code utilisateur .
Original:
These objects are guaranteed to be constructed before the first constructor of a static object is called and they are guaranteed to outlive the last destructor of a static object, so that it is always possible to write to std::clog in user code.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Sauf sync_with_stdio(false) a été délivré, il est sûr d'accéder simultanément à ces objets à partir de plusieurs threads à la fois pour une sortie formatée et non formaté .
Original:
Unless sync_with_stdio(false) has been issued, it is safe to concurrently access these objects from multiple threads for both formatted and unformatted output.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Exemple

#include <iostream>
struct Foo {
    int n;
    Foo() {
       std::clog << "static constructor\n";
    }
    ~Foo() {
       std::clog << "static destructor\n";
    }
};
Foo f; // static object
int main()
{
    std::clog << "main function\n";
}

Résultat :

static constructor
main function
static destructor

[modifier] Voir aussi

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) [edit]
écrit dans le flux d'erreur standard C stderr, unbuffered
(
objet global
Original:
global object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
)
Original:
writes to the standard C error stream stderr, unbuffered
(
objet global
Original:
global object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]
écrit à la norme C stdout
(
objet global
Original:
global object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
)
flux de sortie
Original:
writes to the standard C output stream stdout
(
objet global
Original:
global object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
[edit]