I am having trouble converting a int64_t to a char array and back. I don\'t know what is wrong with the code below, it makes complete logical sense to me. The code works for
In charTo64bitNum you need to cast the char to 64-bit before you shift it:
charTo64bitNum
(((int64_t)a[0] << 56) & 0xFF00000000000000U)