fork download
  1. #include <bitset>
  2. #include <cstdint>
  3. #include <vector>
  4. #include <algorithm>
  5.  
  6. int main()
  7. {
  8. std::vector <uint8_t> buffer(100, 0);
  9. std::bitset<37> b;
  10. int i = 0;
  11. std::for_each(buffer.begin() + 20, buffer.begin() + 57, [&](uint8_t val)
  12. { b[i] = val; ++i; });
  13. }
  14.  
  15.  
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
Standard output is empty