C Concatenate string in while loop

后端 未结 2 1328
挽巷
挽巷 2021-01-16 02:47

I\'m trying to concatenate part of a struct with hex values. I run over every byte in the loop and convert to hex, then I want to concatenate all the hex into one long strin

2条回答
  •  借酒劲吻你
    2021-01-16 03:15

    In do_file(), you are copying the hex value for a single byte in a while loop. Thus, you should go to the next byte of character array buffer with each iteration of the while loop i.e. buffer++ or strcpy(buffer[loop], msg);

提交回复
热议问题