Advertisement
captainIBM

Untitled

Nov 28th, 2017
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. std::string data = "0110011101100001011101010111010001101000011010010110010101110010";
  2.     std::stringstream sstream(data);
  3.     std::string output;
  4.     while(sstream.good())
  5.     {
  6.         std::bitset<8> bits;
  7.         sstream >> bits;
  8.         char c = char(bits.to_ulong());
  9.         output += c;
  10.     }
  11.  
  12.     std::cout << output;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement