> Yep, just point a double* to the base of the 8 byte char array and dereference it.
Better watch out for those alignment exceptions then, if such a pointer were to be mis-aligned for a double.
Type: Posts; User: Salem
> Yep, just point a double* to the base of the 8 byte char array and dereference it.
Better watch out for those alignment exceptions then, if such a pointer were to be mis-aligned for a double.
So long as your 8 bytes are in the correct byte order for the endian of your machine, then you can do
memcpy( &myDouble, mybuffer, sizeof(myDouble) );
But you're making a few assumptions by...