Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P7
Dynamically Allocated Bitset
Active
Public
Actions
Authored by
jcmcdonald
on Mar 6 2015, 3:21 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
Ratscript [Project]
Subscribers
None
/*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
edited the content of this paste.
(Show Details)
Mar 6 2015, 3:21 PM
2015-03-06 15:21:55 (UTC-8)
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
added a project:
Ratscript [Project]
.
jcmcdonald
edited the content of this paste.
(Show Details)
jcmcdonald
updated the paste's language from
autodetect
to
cpp
.
jcmcdonald
edited the content of this paste.
(Show Details)
Mar 6 2015, 3:26 PM
2015-03-06 15:26:14 (UTC-8)
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)
Log In to Comment