Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • D

Idiom #68 Create a bitset

Create an object x to store n bits (n being potentially large).

import std.bitmanip;
BitArray x;
x.length = n;
#include <bitset>
std::bitset<n> x;

New implementation...
< >
programming-idioms.org