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
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.