Guest User

Untitled

a guest
Mar 23rd, 2015
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <cstdint>                                       //uint8_t
  2. #include <cstdlib>                                       //std::malloc() / std::free() / std::calloc()
  3.  
  4. void f()
  5. {
  6.     uint8_t* bit_array = (uint8_t*)std::calloc(512); //filled with all zeros && sizeof(uint8_t) == 1
  7. }
  8.  
  9. //temp = bit_array[i];                                   //from m == 7 to 0 with step --m
  10. //temp |= 1 << m;                                        //  set bit
  11. //temp &= ~(1 << m);                                     //reset bit
Advertisement
Add Comment
Please, Sign In to add comment