std::ends

Da cppreference.com.
< cpp‎ | io‎ | manip

 
 
Ingresso / libreria di output
I / O manipolatori
C-style I / O
Buffer
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(deprecato)
Streams
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Astrazioni
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
String 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
Array 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(deprecato)
ostrstream(deprecato)
strstream(deprecato)
Tipi
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
Errore categoria interfaccia
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)
 
Ingresso / uscita manipolatori
Virgola mobile formattazione
Original:
Floating-point formatting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Formattazione Integer
Original:
Integer formatting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Formattazione Boolean
Original:
Boolean formatting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
boolalpha
noboolalpha
Larghezza del campo e il controllo di riempimento
Original:
Field width and fill control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Di formattazione
Original:
Other formatting
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Elaborazione degli spazi vuoti
Original:
Whitespace processing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ws
ends
Uscita di lavaggio
Original:
Output flushing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Flag di stato manipolazione
Original:
Status flags manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Tempo e denaro I / O
Original:
Time and money I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
get_money(C++11)
get_time(C++11)
put_money(C++11)
put_time(C++11)
 
Elemento definito nell'header <ostream>
template<class CharT, class Traits >
std::basic_ostream<charT,traits>& ends(std::basic_ostream<CharT, Traits>& os );
Inserisce un carattere null nella sequenza di output os come se chiamando os.put(CharT()).
Original:
Inserts a null character into the output sequence os as if by calling os.put(CharT()).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si tratta di un solo output manipolatore di I / O, può essere chiamato con espressioni quali out << std::ends per qualsiasi out di std::basic_ostream tipo.
Original:
This is an output-only I/O manipulator, it may be called with an expression such as out << std::ends for any out of type std::basic_ostream.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Indice

[modifica]Note

Il manipolatore è in genere utilizzato con std::ostrstream, quando il buffer di uscita associata deve essere null-terminata da trattare come una stringa C.
Original:
This manipulator is typically used with std::ostrstream, when the associated output buffer needs to be null-terminated to be processed as a C string.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
A differenza di std::endl, questo manipolatore non lavare il flusso.
Original:
Unlike std::endl, this manipulator does not flush the stream.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica]Parametri

os -
riferimento al flusso di output
Original:
reference to output stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica]Valore di ritorno

os (riferimento al flusso dopo l'inserimento del carattere null)
Original:
os (reference to the stream after insertion of the null character)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica]Esempio

#include <cstdio>#include <strstream>int main(){ std::ostrstream oss; oss <<"Sample text: "<<42<< std::ends;std::printf("%s\n", oss.str()); oss.freeze(false);// enable memory deallocation}

Output:

Sample text: 42

[modifica]Vedi anche

(deprecato)
implementa operazioni di output di array di caratteri
Original:
implements character array 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)
close