std::setiosflags

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.
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.
setiosflags
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 <iomanip>
/*unspecified*/ setiosflags( std::ios_base::fmt_flags mask );

When used in an expression out << setiosflags(mask) or in >> setiosflags(mask), sets all format flags of the stream out or in as specified by the mask.

Indice

[modifica]Parametri

mask - bitmask of the flags to set

[modifica]Valore di ritorno

Restituisce un oggetto di tipo non specificato tale che se str è il nome di un flusso di output di tipo std::basic_ostream<CharT, Traits> o std::basic_istream<CharT, Traits>, allora l'espressione str << setiosflags(mask)str >> setiosflags(mask) o si comporta come se il codice riportato di seguito è stato eseguito:
Original:
Returns an object of unspecified type such that if str is the name of an output stream of type std::basic_ostream<CharT, Traits> or std::basic_istream<CharT, Traits>, then the expression str << setiosflags(mask) or str >> setiosflags(mask) behaves as if the following code was executed:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

str.setf(mask);

[modifica]Esempio

#include <iostream>#include <iomanip>int main(){std::cout<<std::resetiosflags(std::ios_base::dec)<< std::setiosflags(std::ios_base::hex|std::ios_base::uppercase|std::ios_base::showbase)<<42<<'\n';}

Output:

0X2A

[modifica]Vedi anche

imposta flag specifico formato
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.

(metodo pubblico)[modifica]
cancella le bandiere ios_base specificati
Original:
clears the specified ios_base flags
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(funzione)[modifica]
close