Guest User

Untitled

a guest
Oct 23rd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <iostream>
  2. #include <sstream>
  3. #include <string.h>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. string normal;
  10. int const Value = 3496683923;
  11. unsigned char const *pByte = (unsigned char const *)&Value;
  12.  
  13. for (size_t i = 0; i < sizeof (Value); ++i)
  14. {
  15. cout << hex<< static_cast<int>(pByte[i]) << endl;
  16.  
  17. }
  18. cout << endl;
  19.  
  20. return 0;
  21. }
  22.  
  23. res = 0;
  24. for (size_t i = 0; i < sizeof (Value); ++i)
  25. {
  26. res = (res<<8) | (Value & 0xFF);
  27. Value >>= 8;
  28. }
Add Comment
Please, Sign In to add comment