std::ws

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.
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 <istream>
template<class CharT, class Traits >
std::basic_istream<CharT,Traits>& ws(std::basic_istream<CharT, Traits>& is );
I rigetti spazi vuoti da un flusso di input.
Original:
Discards leading whitespace from an input stream.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si comporta come un UnformattedInputFunction, tranne che is.gcount() non viene modificato. Dopo la costruzione e la verifica dell'oggetto sentinella, estrae i caratteri dal flusso e scarta loro fino a quando una delle seguenti condizioni:
Original:
Behaves as an UnformattedInputFunction, except that is.gcount() is not modified. After constructing and checking the sentry object, extracts characters from the stream and discards them until any one of the following conditions occurs:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • condizione di fine file avviene nella sequenza di input (in questo caso la funzione chiama setstate(eofbit) ma non imposta failbit.
    Original:
    end of file condition occurs in the input sequence (in which case the function calls setstate(eofbit) but does not set failbit.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • c il successivo carattere disponibile nella sequenza di input non è uno spazio determinato dal std::isspace(c, is.getloc()). La non-spazio bianco carattere non è estratto.
    Original:
    the next available character c in the input sequence is not whitespace as determined by std::isspace(c, is.getloc()). The non-whitespace character is not extracted.
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Questo è un ingresso solo manipolatore di I / O, può essere chiamato con espressioni quali in << std::ws per qualsiasi in di tipo std::basic_istream.
Original:
This is an input-only I/O manipulator, it may be called with an expression such as in << std::ws for any in of type std::basic_istream.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Indice

[modifica]Parametri

is -
riferimento al flusso di input
Original:
reference to input 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

is (riferimento al flusso dopo l'estrazione di spazi consecutivi)
Original:
is (reference to the stream after extraction of consecutive whitespace)
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 <iostream>#include <sstream>int main(){std::istringstream s(" this is a test");std::string line; s >> std::ws; getline(s, line);std::cout<<"ws + getline returns: \""<< line <<"\"\n";}

Output:

ws + getline returns: "this is a test"

[modifica]Vedi anche

estratti e personaggi scarta fino a quando il carattere dato è stato trovato
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.

(metodo pubblico)[modifica]
close