◐ Shell
clean mode source ↗

std::basic_ios::tie — cppreference.com

De cppreference.com

<metanoindex/>

<tbody> </tbody>

std::basic_ostream<CharT,Traits>* tie() const;

(1)

std::basic_ostream<CharT,Traits>* tie( std::basic_ostream<CharT,Traits>* str );

(2)

Gère le flux liés. Un courant est attaché un flux de sortie qui est synchronisé avec la séquence commandée par le tampon de flux (rdbuf()), qui est, flush() est appelé le courant avant toute opération liée d'entrée / sortie sur *this .

Original:

Manages the tied stream. A tied stream is a output stream which is synchronized with the sequence controlled by the stream buffer (rdbuf()), that is, flush() is called on the tied stream before any input/output operation on *this.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

1)

Retourne le flux de courant liées. S'il n'y a aucun flux liés, NULL est retourné .

Original:

Returns the current tied stream. If there is no tied stream, NULL is returned.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

2)

Définit le flux actuel lié à str. Retourne le flux lié avant l'opération. S'il n'y a aucun flux liés, NULL est retourné .

Original:

Sets the current tied stream to str. Returns the tied stream before the operation. If there is no tied stream, NULL is returned.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Paramètres

str -

un flux de sortie pour régler le flux liés

Original:

an output stream to set as the tied stream

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Retourne la valeur

Le flux lié, ou NULL s'il n'y avait pas de flux liés .

Original:

The tied stream, or NULL if there was no tied stream.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Exceptions

(Aucun)

Original:

(none)

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Notes

Par défaut, les flux standards cin, cerr et clog sont liés à cout. De même, leurs homologues de larges wcin, wcerr et wclog sont liés à wcout .

Original:

By default, the standard streams cin, cerr and clog are tied to cout. Similarly, their wide counterparts wcin, wcerr and wclog are tied to wcout.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Exemple