public member function
<bitset>
std::bitset::reset all bits (1)bitset& reset();single bit (2)
bitset& reset (size_t pos);all bits (1)
bitset& reset() noexcept;single bit (2)
bitset& reset (size_t pos);
Reset bits
Resets bits to zero:0
.
*this
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// bitset::reset
#include <iostream> // std::cout
#include <string> // std::string
#include <bitset> // std::bitset
int main ()
{
std::bitset<4> foo (std::string("1011"));
std::cout << foo.reset(1) << '\n'; // 1001
std::cout << foo.reset() << '\n'; // 0000
return 0;
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4