Page MenuHomePhabricator

Dynamically Allocated Bitset
ActivePublic

Authored by jcmcdonald on Mar 6 2015, 3:21 PM.
/*The following example code would dynamically allocate a bitset as 1000,
change it to 0101, and then delete it at the end.*/
typedef bitset<4> testBitset;
testBitset* tB = new testBitset("1000");
tB->reset(3);
tB->set(0);
tB->set(2);
cout << *tB << endl;
delete tB;

Event Timeline

jcmcdonald changed the title of this paste from untitled to Vector<bool> to Bitset.
jcmcdonald updated the paste's language from autodetect to autodetect.
jcmcdonald edited the content of this paste. (Show Details)
jcmcdonald updated the paste's language from autodetect to cpp.
jcmcdonald changed the title of this paste from Vector<bool> to Bitset to Dynamically Allocated Bitset.
jcmcdonald edited the content of this paste. (Show Details)