repo.or.cz
/
marnav.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
AIS: binary payload 001/11 separated to its own files.
[marnav.git]
/
examples
/
bitset_iterate.cpp
blob
475167dce2df541d61c7eb651b1ccfa85adab2a7
1
#include <iostream>
2
#include <marnav/utils/bitset.hpp>
3
4
int
main
(
int
,
char
**)
5
{
6
marnav
::
utils
::
bitset
<
uint32_t
>
bits
;
7
8
// append some data
9
bits
.
append
(
0xaa
,
8
);
10
bits
.
append
(
0x55
,
8
);
11
12
// iterate through all bits and print them to stdout
13
for
(
auto
const
&
bit
:
bits
)
14
std
::
cout
<<
bit
;
15
std
::
cout
<<
"
\n
"
;
16
}