std::bitset::reset
Da cppreference.com.
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
<metanoindex/>
<tbody> </tbody> bitset<N>& reset(); |
(1) | |
bitset<N>& reset( size_t pos ); |
(2) | |
Imposta i bit a
false.Original:
Sets bits to
false.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
1)
Imposta tutti i bit a
falseOriginal:
Sets all bits to
falseThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
2)
Consente di impostare il bit in posizione
pos a false.Original:
Sets the bit at position
pos to false.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Parametri
| pos | - | la posizione del bit da impostare
Original: the position of the bit to set The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Valore di ritorno
*this
Eccezioni
1)
2)
tiri std::out_of_range
pos se non corrisponde ad una posizione valida all'interno del bitsetOriginal:
throws std::out_of_range if
pos does not correspond to a valid position within the bitsetThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Esempio
#include <iostream>
#include <bitset>
int main()
{
std::bitset<8> b(42);
std::cout << "Bitset is " << b << '\n';
b.reset(1);
std::cout << "After b.reset(1): " << b << '\n';
b.reset();
std::cout << "After b.reset(): " << b << '\n';
}
Output:
Bitset is 00101010
After b.reset(1): 00101000
After b.reset(): 00000000
Vedi anche
sets bits to true or given value (metodo pubblico) | |
alterna i valori di bit Original: toggles the values of bits The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (metodo pubblico) | |