Try this:
double a;
memcpy(&a, ptr, sizeof(double));
where ptr
is the pointer to your byte array. If you want to avoid copying use a union, e.g.
union {
double d;
char bytes[sizeof(double)];
} u;
// Store your data in u.bytes
// Use floating point number from u.d
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…