I have a byte array that represents double:
char number[8];
I need to cast this to actual double (which has 8 bytes as well). Based on advice I tried this, but it failed:
std::cout<<(*((*double)number))<<" is my number.\n";
Why did it fail and what should I do? I can, of course, extract the data using some <<
magic, but I don't want to do this - it would consume memory and make code too robust.