I have a struct of doubles like so:

Code:
struct data
{
  double x;
  double y;
  double z;
} data;
I want to be able to store it anywhere on the stack instead of using malloc or dynamic allocation on the heap (don't ask). I wish to know what would be the best datatype to use? It doesn't have to be the precise size, only larger, because it will be used for scratching using memcpy().

Could I do this (?):

Code:
char scratch[32];
data inst;
memcpy(&scratch, &inst, sizeof(data));