Paste Search Dynamic
Recent pastes
string2
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4. typedef unsigned char BYTE;
  5. int main() {
  6.         // vector of BYTE, contains these 7 elements for example: (0,30,85,160,155,93,0)
  7.         std::vector<BYTE> data = {0, 35, 35 ,38};
  8.        
  9.         // method 2
  10.         std::string string2(data.begin(),data.end());
  11.         cout<< (int)string2[4] << " size:"<< string2.size() <<endl;
  12.         return 0;
  13. }
Parsed in 0.002 seconds