Converting int[] to String in C++

前端 未结 6 1218
星月不相逢
星月不相逢 2020-12-16 06:26

I have a string defined as std::string header = \"00110033\"; now I need the string to hold the byte values of the digits as if its constructed like this

6条回答
  •  囚心锁ツ
    2020-12-16 07:12

     char data_bytes[] = { 0, 0, 1, 1, 0, 0, 3, 3};
      std::string str;
     for(int i =0;i

提交回复
热议问题