Encoding, decoding an integer to a char array

后端 未结 10 2411
借酒劲吻你
借酒劲吻你 2021-02-06 19:44

Please note that this is not homework and i did search before starting this new thread. I got Store an int in a char array?

I was looking for an answer but didn\'t get a

10条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-06 20:05

    Maybe you need to make this work with an existing protocol, in which case, ignore my answer.

    Rather than reinvent the wheel here, why don't you use Google's Protocol Buffers library to do this job? Simpler, more flexible and very efficient.

提交回复
热议问题