Espacios de nombres
Variantes
Acciones

operator<<,>>(std::bitset)

De cppreference.com
< cpp‎ | utility‎ | bitset

 
 
Utilidades de la biblioteca
Escriba apoyo (basic types, RTTI, type traits)
Gestión de memoria dinámica
Gestión de errores
Programa de servicios públicos
Funciones variadic
Fecha y hora
Objetos Function
initializer_list(C++11)
bitset
hash(C++11)
Operadores relacionales
Original:
Relational operators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rel_ops::operator!=
rel_ops::operator>
rel_ops::operator<=
rel_ops::operator>=
Pares y tuplas
Original:
Pairs and tuples
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
pair
tuple(C++11)
piecewise_construct_t(C++11)
piecewise_construct(C++11)
Cambiar, hacia adelante y mover
Original:
Swap, forward and move
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
swap
forward(C++11)
move(C++11)
move_if_noexcept(C++11)
declval(C++11)
 
std::bitset
Tipos de miembros
Original:
Member types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bitset::reference
Las funciones miembro
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bitset::bitset
bitset::operator==
bitset::operator!=
Elemento acceso
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bitset::operator[]
bitset::test
bitset::all
bitset::any
bitset::none
(C++11)

 
bitset::count
Capacidad
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bitset::size
Modificadores
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bitset::operator&=
bitset::operator|=
bitset::operator^=
bitset::operator~
bitset::operator<<=
bitset::operator>>=
bitset::operator<<
bitset::operator>>
bitset::set
bitset::reset
bitset::flip
Conversiones
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bitset::to_string
bitset::to_ulong
bitset::to_ullong(C++11)
Terceros funciones
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
operator&
operator|
operator^
operator<<
operator>>
Clases de ayuda
Original:
Helper classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
std::hash(C++11)
 
template <class CharT, class Traits, size_t N>

std::basic_ostream<CharT, Traits>& operator<<(std::basic_ostream<CharT, Traits>& os,

                                              const bitset<N>& x);
(1)
template <class CharT, class Traits, size_t N>

std::basic_istream<CharT, Traits>& operator>>(std::basic_istream<CharT, Traits>& is,

                                              bitset<N>& x);
(2)
Inserta un BitSet o extractos de una secuencia de caracteres .
Original:
Inserts or extracts a bitset from a character stream.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Escribe el x bitset al os flujo de caracteres .
Original:
Writes the bitset x to the character stream os.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Extractos de hasta personajes N de is y almacena los caracteres de la x bitset .
Original:
Extracts up to N characters from is and stores the characters in the bitset x.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Los caracteres se extrae hasta que o bien
Original:
Characters are extracted until either
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
  • N personajes han sido leídos,
    Original:
    N characters have been read,
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • al final de su archivo se produce en is, o
    Original:
    end-of-file occurs in is, or
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
  • el siguiente carácter no es ni is.widen('0') ni is.widen('1') .
    Original:
    the next character is neither is.widen('0') nor is.widen('1').
    The text has been machine-translated via Google Translate.
    You can help to correct and verify the translation. Click here for instructions.
Si no hay ningún carácter extraído, is.setstate(ios_base::failbit) se llama .
Original:
If no characters are extracted, is.setstate(ios_base::failbit) is called.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Parámetros

os -
el flujo de caracteres para escribir
Original:
the character stream to write to
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
is -
el flujo de caracteres a leer
Original:
the character stream to read from
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
x -
la bitset para ser leído o escrito
Original:
the bitset to be read or written
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Valor de retorno

La secuencia de caracteres que fue operado, por ejemplo, os o is .
Original:
The character stream that was operated on, e.g. os or is.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Ejemplo

#include <bitset>
#include <iostream>
#include <sstream>
 
int main()
{
    std::string bit_string = "001101";
    std::istringstream bit_stream(bit_string);
 
    std::bitset<3> b1;
    bit_stream >> b1;
    std::cout << b1 << '\n';
    std::bitset<8> b2;
    bit_stream >> b2;
    std::cout << b2 << '\n';
}

Output:

001
00000101

[editar] Ver también

realiza izquierda binario desplazamiento y desplazamiento a la derecha
Original:
performs binary shift left and shift right
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(miembro público función) [edit]